From 39679d00f7f852bbe5b1c21371c8b16127105623 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Thu, 30 Jan 2020 17:48:36 +0900 Subject: [PATCH] bump up to v1.0.0 --- .gitignore | 3 - lib/main.js | 47 + lib/upload-release-asset.js | 56 + node_modules/@actions/core/README.md | 140 + node_modules/@actions/core/lib/command.d.ts | 16 + node_modules/@actions/core/lib/command.js | 66 + node_modules/@actions/core/lib/command.js.map | 1 + node_modules/@actions/core/lib/core.d.ts | 112 + node_modules/@actions/core/lib/core.js | 195 + node_modules/@actions/core/lib/core.js.map | 1 + node_modules/@actions/core/package.json | 68 + node_modules/@actions/github/README.md | 74 + node_modules/@actions/github/lib/context.d.ts | 26 + node_modules/@actions/github/lib/context.js | 46 + .../@actions/github/lib/context.js.map | 1 + node_modules/@actions/github/lib/github.d.ts | 25 + node_modules/@actions/github/lib/github.js | 94 + .../@actions/github/lib/github.js.map | 1 + .../@actions/github/lib/interfaces.d.ts | 36 + .../@actions/github/lib/interfaces.js | 4 + .../@actions/github/lib/interfaces.js.map | 1 + node_modules/@actions/github/package.json | 77 + node_modules/@actions/glob/lib/glob.d.ts | 10 + node_modules/@actions/glob/lib/glob.js | 25 + node_modules/@actions/glob/lib/glob.js.map | 1 + .../lib/internal-glob-options-helper.d.ts | 5 + .../glob/lib/internal-glob-options-helper.js | 30 + .../lib/internal-glob-options-helper.js.map | 1 + .../glob/lib/internal-glob-options.d.ts | 29 + .../glob/lib/internal-glob-options.js | 3 + .../glob/lib/internal-glob-options.js.map | 1 + .../@actions/glob/lib/internal-globber.d.ts | 42 + .../@actions/glob/lib/internal-globber.js | 215 + .../@actions/glob/lib/internal-globber.js.map | 1 + .../glob/lib/internal-match-kind.d.ts | 13 + .../@actions/glob/lib/internal-match-kind.js | 17 + .../glob/lib/internal-match-kind.js.map | 1 + .../glob/lib/internal-path-helper.d.ts | 42 + .../@actions/glob/lib/internal-path-helper.js | 175 + .../glob/lib/internal-path-helper.js.map | 1 + .../@actions/glob/lib/internal-path.d.ts | 15 + .../@actions/glob/lib/internal-path.js | 90 + .../@actions/glob/lib/internal-path.js.map | 1 + .../glob/lib/internal-pattern-helper.d.ts | 15 + .../glob/lib/internal-pattern-helper.js | 74 + .../glob/lib/internal-pattern-helper.js.map | 1 + .../@actions/glob/lib/internal-pattern.d.ts | 59 + .../@actions/glob/lib/internal-pattern.js | 231 + .../@actions/glob/lib/internal-pattern.js.map | 1 + .../glob/lib/internal-search-state.d.ts | 5 + .../glob/lib/internal-search-state.js | 10 + .../glob/lib/internal-search-state.js.map | 1 + node_modules/@actions/glob/package.json | 71 + node_modules/@actions/http-client/LICENSE | 21 + node_modules/@actions/http-client/README.md | 73 + node_modules/@actions/http-client/actions.png | Bin 0 -> 33889 bytes node_modules/@actions/http-client/auth.d.ts | 23 + node_modules/@actions/http-client/auth.js | 55 + node_modules/@actions/http-client/index.d.ts | 100 + node_modules/@actions/http-client/index.js | 386 + .../@actions/http-client/interfaces.d.ts | 44 + .../@actions/http-client/interfaces.js | 3 + .../@actions/http-client/package.json | 66 + node_modules/@actions/http-client/proxy.d.ts | 4 + node_modules/@actions/http-client/proxy.js | 57 + node_modules/@octokit/auth-token/LICENSE | 21 + node_modules/@octokit/auth-token/README.md | 257 + .../@octokit/auth-token/dist-node/index.js | 49 + .../auth-token/dist-node/index.js.map | 1 + .../@octokit/auth-token/dist-src/auth.js | 12 + .../@octokit/auth-token/dist-src/hook.js | 6 + .../@octokit/auth-token/dist-src/index.js | 14 + .../@octokit/auth-token/dist-src/types.js | 0 .../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 | 25 + .../dist-types/with-authorization-prefix.d.ts | 6 + .../@octokit/auth-token/dist-web/index.js | 46 + .../@octokit/auth-token/dist-web/index.js.map | 1 + node_modules/@octokit/auth-token/package.json | 79 + node_modules/@octokit/endpoint/LICENSE | 21 + node_modules/@octokit/endpoint/README.md | 421 + .../@octokit/endpoint/dist-node/index.js | 379 + .../@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 | 22 + .../@octokit/endpoint/dist-src/parse.js | 81 + .../dist-src/util/add-query-parameters.js | 21 + .../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 + .../endpoint/dist-src/util/url-template.js | 170 + .../@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 + .../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 | 379 + .../@octokit/endpoint/dist-web/index.js.map | 1 + .../node_modules/is-plain-object/LICENSE | 21 + .../node_modules/is-plain-object/README.md | 119 + .../node_modules/is-plain-object/index.cjs.js | 48 + .../node_modules/is-plain-object/index.d.ts | 3 + .../node_modules/is-plain-object/index.js | 35 + .../node_modules/is-plain-object/package.json | 127 + .../endpoint/node_modules/isobject/LICENSE | 21 + .../endpoint/node_modules/isobject/README.md | 127 + .../node_modules/isobject/index.cjs.js | 14 + .../endpoint/node_modules/isobject/index.d.ts | 3 + .../endpoint/node_modules/isobject/index.js | 10 + .../node_modules/isobject/package.json | 128 + node_modules/@octokit/endpoint/package.json | 80 + node_modules/@octokit/graphql/LICENSE | 21 + node_modules/@octokit/graphql/README.md | 380 + .../@octokit/graphql/dist-node/index.js | 85 + .../@octokit/graphql/dist-node/index.js.map | 1 + .../@octokit/graphql/dist-src/error.js | 14 + .../@octokit/graphql/dist-src/graphql.js | 34 + .../@octokit/graphql/dist-src/index.js | 17 + .../@octokit/graphql/dist-src/types.js | 0 .../@octokit/graphql/dist-src/version.js | 1 + .../graphql/dist-src/with-defaults.js | 12 + .../@octokit/graphql/dist-types/error.d.ts | 7 + .../@octokit/graphql/dist-types/graphql.d.ts | 3 + .../@octokit/graphql/dist-types/index.d.ts | 3 + .../@octokit/graphql/dist-types/types.d.ts | 47 + .../@octokit/graphql/dist-types/version.d.ts | 1 + .../graphql/dist-types/with-defaults.d.ts | 3 + .../@octokit/graphql/dist-web/index.js | 81 + .../@octokit/graphql/dist-web/index.js.map | 1 + node_modules/@octokit/graphql/package.json | 83 + node_modules/@octokit/request-error/LICENSE | 21 + node_modules/@octokit/request-error/README.md | 68 + .../@octokit/request-error/dist-node/index.js | 55 + .../request-error/dist-node/index.js.map | 1 + .../@octokit/request-error/dist-src/index.js | 40 + .../@octokit/request-error/dist-src/types.js | 0 .../request-error/dist-types/index.d.ts | 27 + .../request-error/dist-types/types.d.ts | 5 + .../@octokit/request-error/dist-web/index.js | 44 + .../request-error/dist-web/index.js.map | 1 + .../@octokit/request-error/package.json | 84 + node_modules/@octokit/request/LICENSE | 21 + node_modules/@octokit/request/README.md | 539 + .../@octokit/request/dist-node/index.js | 148 + .../@octokit/request/dist-node/index.js.map | 1 + .../request/dist-src/fetch-wrapper.js | 93 + .../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 | 132 + .../@octokit/request/dist-web/index.js.map | 1 + .../node_modules/is-plain-object/LICENSE | 21 + .../node_modules/is-plain-object/README.md | 119 + .../node_modules/is-plain-object/index.cjs.js | 48 + .../node_modules/is-plain-object/index.d.ts | 3 + .../node_modules/is-plain-object/index.js | 35 + .../node_modules/is-plain-object/package.json | 127 + .../request/node_modules/isobject/LICENSE | 21 + .../request/node_modules/isobject/README.md | 127 + .../node_modules/isobject/index.cjs.js | 14 + .../request/node_modules/isobject/index.d.ts | 3 + .../request/node_modules/isobject/index.js | 10 + .../node_modules/isobject/package.json | 128 + .../node_modules/node-fetch/CHANGELOG.md | 266 + .../node_modules/node-fetch/LICENSE.md | 22 + .../request/node_modules/node-fetch/README.md | 583 + .../node_modules/node-fetch/browser.js | 23 + .../node_modules/node-fetch/lib/index.es.js | 1633 + .../node_modules/node-fetch/lib/index.js | 1642 + .../node_modules/node-fetch/lib/index.mjs | 1631 + .../node_modules/node-fetch/package.json | 96 + node_modules/@octokit/request/package.json | 94 + node_modules/@octokit/rest/LICENSE | 22 + node_modules/@octokit/rest/README.md | 46 + node_modules/@octokit/rest/index.d.ts | 40793 ++++++++++++++++ node_modules/@octokit/rest/index.js | 15 + node_modules/@octokit/rest/lib/constructor.js | 29 + node_modules/@octokit/rest/lib/core.js | 3 + node_modules/@octokit/rest/lib/factory.js | 10 + .../@octokit/rest/lib/parse-client-options.js | 89 + .../@octokit/rest/lib/register-plugin.js | 9 + node_modules/@octokit/rest/package.json | 176 + .../authentication-deprecated/authenticate.js | 52 + .../before-request.js | 43 + .../authentication-deprecated/index.js | 31 + .../request-error.js | 55 + .../plugins/authentication/before-request.js | 53 + .../rest/plugins/authentication/index.js | 76 + .../plugins/authentication/request-error.js | 61 + .../rest/plugins/authentication/validate.js | 21 + .../with-authorization-prefix.js | 23 + .../@octokit/rest/plugins/log/index.js | 28 + .../@octokit/rest/plugins/pagination/index.js | 9 + .../rest/plugins/pagination/iterator.js | 34 + .../normalize-paginated-list-response.js | 116 + .../rest/plugins/pagination/paginate.js | 40 + .../rest/plugins/register-endpoints/index.js | 7 + .../register-endpoints/register-endpoints.js | 101 + .../rest/plugins/rest-api-endpoints/index.js | 13 + .../plugins/rest-api-endpoints/routes.json | 6755 +++ .../@octokit/rest/plugins/validate/index.js | 7 + .../rest/plugins/validate/validate.js | 151 + node_modules/@octokit/types/LICENSE | 7 + node_modules/@octokit/types/README.md | 19 + node_modules/@octokit/types/package.json | 108 + .../@octokit/types/src/AuthInterface.ts | 43 + .../@octokit/types/src/EndpointDefaults.ts | 22 + .../@octokit/types/src/EndpointInterface.ts | 74 + .../@octokit/types/src/EndpointOptions.ts | 8 + node_modules/@octokit/types/src/Fetch.ts | 4 + .../@octokit/types/src/OctokitResponse.ts | 18 + .../@octokit/types/src/RequestHeaders.ts | 15 + .../@octokit/types/src/RequestInterface.ts | 34 + .../@octokit/types/src/RequestMethod.ts | 10 + .../@octokit/types/src/RequestOptions.ts | 15 + .../@octokit/types/src/RequestParameters.ts | 46 + .../types/src/RequestRequestOptions.ts | 27 + .../@octokit/types/src/ResponseHeaders.ts | 21 + node_modules/@octokit/types/src/Route.ts | 4 + node_modules/@octokit/types/src/Signal.ts | 6 + .../@octokit/types/src/StrategyInterface.ts | 9 + node_modules/@octokit/types/src/Url.ts | 4 + node_modules/@octokit/types/src/VERSION.ts | 1 + .../@octokit/types/src/generated/Endpoints.ts | 16306 ++++++ .../@octokit/types/src/generated/README.md | 3 + node_modules/@octokit/types/src/index.ts | 18 + node_modules/@types/node/LICENSE | 21 + node_modules/@types/node/README.md | 16 + node_modules/@types/node/assert.d.ts | 48 + node_modules/@types/node/async_hooks.d.ts | 132 + node_modules/@types/node/base.d.ts | 41 + node_modules/@types/node/buffer.d.ts | 22 + node_modules/@types/node/child_process.d.ts | 478 + node_modules/@types/node/cluster.d.ts | 260 + node_modules/@types/node/console.d.ts | 3 + node_modules/@types/node/constants.d.ts | 448 + node_modules/@types/node/crypto.d.ts | 614 + node_modules/@types/node/dgram.d.ts | 118 + node_modules/@types/node/dns.d.ts | 366 + node_modules/@types/node/domain.d.ts | 16 + node_modules/@types/node/events.d.ts | 39 + node_modules/@types/node/fs.d.ts | 2446 + node_modules/@types/node/globals.d.ts | 1165 + node_modules/@types/node/http.d.ts | 371 + node_modules/@types/node/http2.d.ts | 947 + node_modules/@types/node/https.d.ts | 53 + node_modules/@types/node/index.d.ts | 104 + node_modules/@types/node/inspector.d.ts | 3034 ++ node_modules/@types/node/module.d.ts | 3 + node_modules/@types/node/net.d.ts | 268 + node_modules/@types/node/os.d.ts | 263 + node_modules/@types/node/package.json | 224 + node_modules/@types/node/path.d.ts | 159 + node_modules/@types/node/perf_hooks.d.ts | 304 + node_modules/@types/node/process.d.ts | 15 + node_modules/@types/node/punycode.d.ts | 12 + node_modules/@types/node/querystring.d.ts | 29 + node_modules/@types/node/readline.d.ts | 150 + node_modules/@types/node/repl.d.ts | 382 + node_modules/@types/node/stream.d.ts | 319 + node_modules/@types/node/string_decoder.d.ts | 7 + node_modules/@types/node/timers.d.ts | 16 + node_modules/@types/node/tls.d.ts | 418 + node_modules/@types/node/trace_events.d.ts | 61 + node_modules/@types/node/ts3.2/fs.d.ts | 33 + node_modules/@types/node/ts3.2/globals.d.ts | 19 + node_modules/@types/node/ts3.2/index.d.ts | 21 + node_modules/@types/node/ts3.2/util.d.ts | 15 + node_modules/@types/node/tty.d.ts | 66 + node_modules/@types/node/url.d.ts | 111 + node_modules/@types/node/util.d.ts | 180 + node_modules/@types/node/v8.d.ts | 197 + node_modules/@types/node/vm.d.ts | 110 + node_modules/@types/node/worker_threads.d.ts | 153 + node_modules/@types/node/zlib.d.ts | 352 + node_modules/atob-lite/LICENSE.md | 18 + node_modules/atob-lite/README.md | 37 + node_modules/atob-lite/atob-browser.js | 3 + node_modules/atob-lite/atob-node.js | 3 + node_modules/atob-lite/package.json | 70 + node_modules/balanced-match/LICENSE.md | 21 + node_modules/balanced-match/README.md | 91 + node_modules/balanced-match/index.js | 59 + node_modules/balanced-match/package.json | 80 + node_modules/before-after-hook/LICENSE | 201 + node_modules/before-after-hook/README.md | 574 + node_modules/before-after-hook/index.d.ts | 96 + node_modules/before-after-hook/index.js | 57 + node_modules/before-after-hook/lib/add.js | 46 + .../before-after-hook/lib/register.js | 28 + node_modules/before-after-hook/lib/remove.js | 17 + node_modules/before-after-hook/package.json | 100 + node_modules/brace-expansion/LICENSE | 21 + node_modules/brace-expansion/README.md | 129 + node_modules/brace-expansion/index.js | 201 + node_modules/brace-expansion/package.json | 78 + node_modules/btoa-lite/LICENSE.md | 18 + node_modules/btoa-lite/README.md | 37 + node_modules/btoa-lite/btoa-browser.js | 3 + node_modules/btoa-lite/btoa-node.js | 3 + node_modules/btoa-lite/package.json | 69 + node_modules/concat-map/LICENSE | 18 + node_modules/concat-map/README.markdown | 62 + node_modules/concat-map/example/map.js | 6 + node_modules/concat-map/index.js | 13 + node_modules/concat-map/package.json | 91 + node_modules/concat-map/test/map.js | 39 + node_modules/cross-spawn/CHANGELOG.md | 100 + node_modules/cross-spawn/LICENSE | 21 + node_modules/cross-spawn/README.md | 94 + node_modules/cross-spawn/index.js | 39 + node_modules/cross-spawn/lib/enoent.js | 59 + node_modules/cross-spawn/lib/parse.js | 125 + node_modules/cross-spawn/lib/util/escape.js | 45 + .../cross-spawn/lib/util/readShebang.js | 32 + .../cross-spawn/lib/util/resolveCommand.js | 47 + .../node_modules/semver/CHANGELOG.md | 39 + .../cross-spawn/node_modules/semver/LICENSE | 15 + .../cross-spawn/node_modules/semver/README.md | 412 + .../node_modules/semver/bin/semver | 160 + .../node_modules/semver/package.json | 63 + .../cross-spawn/node_modules/semver/range.bnf | 16 + .../cross-spawn/node_modules/semver/semver.js | 1483 + node_modules/cross-spawn/package.json | 111 + 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 | 68 + node_modules/end-of-stream/LICENSE | 21 + node_modules/end-of-stream/README.md | 54 + node_modules/end-of-stream/index.js | 94 + node_modules/end-of-stream/package.json | 68 + node_modules/execa/index.js | 361 + node_modules/execa/lib/errname.js | 39 + node_modules/execa/lib/stdio.js | 41 + node_modules/execa/license | 9 + node_modules/execa/package.json | 106 + node_modules/execa/readme.md | 327 + node_modules/get-stream/buffer-stream.js | 51 + node_modules/get-stream/index.js | 50 + node_modules/get-stream/license | 9 + node_modules/get-stream/package.json | 81 + node_modules/get-stream/readme.md | 123 + node_modules/is-stream/index.js | 21 + node_modules/is-stream/license | 21 + node_modules/is-stream/package.json | 73 + node_modules/is-stream/readme.md | 42 + node_modules/isexe/LICENSE | 15 + node_modules/isexe/README.md | 51 + node_modules/isexe/index.js | 57 + node_modules/isexe/mode.js | 41 + node_modules/isexe/package.json | 63 + node_modules/isexe/test/basic.js | 221 + node_modules/isexe/windows.js | 42 + node_modules/lodash.get/LICENSE | 47 + node_modules/lodash.get/README.md | 18 + node_modules/lodash.get/index.js | 931 + node_modules/lodash.get/package.json | 72 + node_modules/lodash.set/LICENSE | 47 + node_modules/lodash.set/README.md | 18 + node_modules/lodash.set/index.js | 990 + node_modules/lodash.set/package.json | 72 + node_modules/lodash.uniq/LICENSE | 47 + node_modules/lodash.uniq/README.md | 18 + node_modules/lodash.uniq/index.js | 896 + node_modules/lodash.uniq/package.json | 72 + node_modules/macos-release/index.d.ts | 36 + node_modules/macos-release/index.js | 32 + node_modules/macos-release/license | 9 + node_modules/macos-release/package.json | 74 + node_modules/macos-release/readme.md | 57 + node_modules/mime-db/HISTORY.md | 439 + node_modules/mime-db/LICENSE | 22 + node_modules/mime-db/README.md | 100 + node_modules/mime-db/db.json | 8060 +++ node_modules/mime-db/index.js | 11 + node_modules/mime-db/package.json | 104 + node_modules/mime-types/HISTORY.md | 325 + node_modules/mime-types/LICENSE | 23 + node_modules/mime-types/README.md | 113 + node_modules/mime-types/index.js | 188 + node_modules/mime-types/package.json | 91 + node_modules/minimatch/LICENSE | 15 + node_modules/minimatch/README.md | 209 + node_modules/minimatch/minimatch.js | 923 + node_modules/minimatch/package.json | 71 + node_modules/nice-try/CHANGELOG.md | 21 + node_modules/nice-try/LICENSE | 21 + node_modules/nice-try/README.md | 32 + node_modules/nice-try/package.json | 64 + node_modules/nice-try/src/index.js | 12 + node_modules/npm-run-path/index.js | 39 + node_modules/npm-run-path/license | 21 + node_modules/npm-run-path/package.json | 80 + node_modules/npm-run-path/readme.md | 81 + .../CODE_OF_CONDUCT.md | 46 + .../octokit-pagination-methods/LICENSE | 22 + .../octokit-pagination-methods/README.md | 42 + .../octokit-pagination-methods/index.js | 12 + .../lib/deprecate.js | 12 + .../lib/get-first-page.js | 7 + .../lib/get-last-page.js | 7 + .../lib/get-next-page.js | 7 + .../lib/get-page-links.js | 15 + .../lib/get-page.js | 38 + .../lib/get-previous-page.js | 7 + .../lib/has-first-page.js | 9 + .../lib/has-last-page.js | 9 + .../lib/has-next-page.js | 9 + .../lib/has-previous-page.js | 9 + .../lib/http-error.js | 15 + .../octokit-pagination-methods/package.json | 79 + .../octokit-pagination-methods/test.js | 93 + node_modules/once/LICENSE | 15 + node_modules/once/README.md | 79 + node_modules/once/once.js | 42 + node_modules/once/package.json | 75 + node_modules/os-name/index.d.ts | 37 + node_modules/os-name/index.js | 46 + node_modules/os-name/license | 9 + node_modules/os-name/package.json | 80 + node_modules/os-name/readme.md | 64 + node_modules/p-finally/index.js | 15 + node_modules/p-finally/license | 21 + node_modules/p-finally/package.json | 77 + node_modules/p-finally/readme.md | 47 + node_modules/path-key/index.js | 13 + node_modules/path-key/license | 21 + node_modules/path-key/package.json | 75 + node_modules/path-key/readme.md | 51 + node_modules/pump/LICENSE | 21 + node_modules/pump/README.md | 65 + node_modules/pump/index.js | 82 + node_modules/pump/package.json | 62 + node_modules/pump/test-browser.js | 66 + node_modules/pump/test-node.js | 53 + node_modules/shebang-command/index.js | 19 + node_modules/shebang-command/license | 21 + node_modules/shebang-command/package.json | 74 + node_modules/shebang-command/readme.md | 39 + node_modules/shebang-regex/index.js | 2 + node_modules/shebang-regex/license | 21 + node_modules/shebang-regex/package.json | 67 + node_modules/shebang-regex/readme.md | 29 + node_modules/signal-exit/CHANGELOG.md | 27 + node_modules/signal-exit/LICENSE.txt | 16 + node_modules/signal-exit/README.md | 40 + node_modules/signal-exit/index.js | 157 + node_modules/signal-exit/package.json | 71 + node_modules/signal-exit/signals.js | 53 + node_modules/strip-eof/index.js | 15 + node_modules/strip-eof/license | 21 + node_modules/strip-eof/package.json | 74 + node_modules/strip-eof/readme.md | 28 + 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 | 67 + node_modules/universal-user-agent/LICENSE.md | 7 + node_modules/universal-user-agent/README.md | 25 + .../universal-user-agent/dist-node/index.js | 22 + .../dist-node/index.js.map | 1 + .../universal-user-agent/dist-src/browser.js | 3 + .../universal-user-agent/dist-src/index.js | 1 + .../universal-user-agent/dist-src/node.js | 12 + .../dist-types/browser.d.ts | 1 + .../dist-types/index.d.ts | 1 + .../universal-user-agent/dist-types/node.d.ts | 1 + .../universal-user-agent/dist-web/index.js | 6 + .../dist-web/index.js.map | 1 + .../universal-user-agent/package.json | 71 + node_modules/which/CHANGELOG.md | 152 + node_modules/which/LICENSE | 15 + node_modules/which/README.md | 51 + node_modules/which/bin/which | 52 + node_modules/which/package.json | 69 + node_modules/which/which.js | 135 + node_modules/windows-release/index.d.ts | 30 + node_modules/windows-release/index.js | 44 + node_modules/windows-release/license | 9 + node_modules/windows-release/package.json | 78 + node_modules/windows-release/readme.md | 56 + node_modules/wrappy/LICENSE | 15 + node_modules/wrappy/README.md | 36 + node_modules/wrappy/package.json | 62 + node_modules/wrappy/wrappy.js | 33 + package-lock.json | 2 +- package.json | 2 +- 515 files changed, 120907 insertions(+), 5 deletions(-) create mode 100644 lib/main.js create mode 100644 lib/upload-release-asset.js 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/package.json 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/package.json create mode 100644 node_modules/@actions/glob/lib/glob.d.ts create mode 100644 node_modules/@actions/glob/lib/glob.js create mode 100644 node_modules/@actions/glob/lib/glob.js.map create mode 100644 node_modules/@actions/glob/lib/internal-glob-options-helper.d.ts create mode 100644 node_modules/@actions/glob/lib/internal-glob-options-helper.js create mode 100644 node_modules/@actions/glob/lib/internal-glob-options-helper.js.map create mode 100644 node_modules/@actions/glob/lib/internal-glob-options.d.ts create mode 100644 node_modules/@actions/glob/lib/internal-glob-options.js create mode 100644 node_modules/@actions/glob/lib/internal-glob-options.js.map create mode 100644 node_modules/@actions/glob/lib/internal-globber.d.ts create mode 100644 node_modules/@actions/glob/lib/internal-globber.js create mode 100644 node_modules/@actions/glob/lib/internal-globber.js.map create mode 100644 node_modules/@actions/glob/lib/internal-match-kind.d.ts create mode 100644 node_modules/@actions/glob/lib/internal-match-kind.js create mode 100644 node_modules/@actions/glob/lib/internal-match-kind.js.map create mode 100644 node_modules/@actions/glob/lib/internal-path-helper.d.ts create mode 100644 node_modules/@actions/glob/lib/internal-path-helper.js create mode 100644 node_modules/@actions/glob/lib/internal-path-helper.js.map create mode 100644 node_modules/@actions/glob/lib/internal-path.d.ts create mode 100644 node_modules/@actions/glob/lib/internal-path.js create mode 100644 node_modules/@actions/glob/lib/internal-path.js.map create mode 100644 node_modules/@actions/glob/lib/internal-pattern-helper.d.ts create mode 100644 node_modules/@actions/glob/lib/internal-pattern-helper.js create mode 100644 node_modules/@actions/glob/lib/internal-pattern-helper.js.map create mode 100644 node_modules/@actions/glob/lib/internal-pattern.d.ts create mode 100644 node_modules/@actions/glob/lib/internal-pattern.js create mode 100644 node_modules/@actions/glob/lib/internal-pattern.js.map create mode 100644 node_modules/@actions/glob/lib/internal-search-state.d.ts create mode 100644 node_modules/@actions/glob/lib/internal-search-state.js create mode 100644 node_modules/@actions/glob/lib/internal-search-state.js.map create mode 100644 node_modules/@actions/glob/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/actions.png create mode 100644 node_modules/@actions/http-client/auth.d.ts create mode 100644 node_modules/@actions/http-client/auth.js create mode 100644 node_modules/@actions/http-client/index.d.ts create mode 100644 node_modules/@actions/http-client/index.js create mode 100644 node_modules/@actions/http-client/interfaces.d.ts create mode 100644 node_modules/@actions/http-client/interfaces.js create mode 100644 node_modules/@actions/http-client/package.json create mode 100644 node_modules/@actions/http-client/proxy.d.ts create mode 100644 node_modules/@actions/http-client/proxy.js 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/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/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/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/node_modules/is-plain-object/LICENSE create mode 100644 node_modules/@octokit/endpoint/node_modules/is-plain-object/README.md create mode 100644 node_modules/@octokit/endpoint/node_modules/is-plain-object/index.cjs.js create mode 100644 node_modules/@octokit/endpoint/node_modules/is-plain-object/index.d.ts create mode 100644 node_modules/@octokit/endpoint/node_modules/is-plain-object/index.js create mode 100644 node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json create mode 100644 node_modules/@octokit/endpoint/node_modules/isobject/LICENSE create mode 100644 node_modules/@octokit/endpoint/node_modules/isobject/README.md create mode 100644 node_modules/@octokit/endpoint/node_modules/isobject/index.cjs.js create mode 100644 node_modules/@octokit/endpoint/node_modules/isobject/index.d.ts create mode 100644 node_modules/@octokit/endpoint/node_modules/isobject/index.js create mode 100644 node_modules/@octokit/endpoint/node_modules/isobject/package.json 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/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/node_modules/is-plain-object/LICENSE create mode 100644 node_modules/@octokit/request/node_modules/is-plain-object/README.md create mode 100644 node_modules/@octokit/request/node_modules/is-plain-object/index.cjs.js create mode 100644 node_modules/@octokit/request/node_modules/is-plain-object/index.d.ts create mode 100644 node_modules/@octokit/request/node_modules/is-plain-object/index.js create mode 100644 node_modules/@octokit/request/node_modules/is-plain-object/package.json create mode 100644 node_modules/@octokit/request/node_modules/isobject/LICENSE create mode 100644 node_modules/@octokit/request/node_modules/isobject/README.md create mode 100644 node_modules/@octokit/request/node_modules/isobject/index.cjs.js create mode 100644 node_modules/@octokit/request/node_modules/isobject/index.d.ts create mode 100644 node_modules/@octokit/request/node_modules/isobject/index.js create mode 100644 node_modules/@octokit/request/node_modules/isobject/package.json create mode 100644 node_modules/@octokit/request/node_modules/node-fetch/CHANGELOG.md create mode 100644 node_modules/@octokit/request/node_modules/node-fetch/LICENSE.md create mode 100644 node_modules/@octokit/request/node_modules/node-fetch/README.md create mode 100644 node_modules/@octokit/request/node_modules/node-fetch/browser.js create mode 100644 node_modules/@octokit/request/node_modules/node-fetch/lib/index.es.js create mode 100644 node_modules/@octokit/request/node_modules/node-fetch/lib/index.js create mode 100644 node_modules/@octokit/request/node_modules/node-fetch/lib/index.mjs create mode 100644 node_modules/@octokit/request/node_modules/node-fetch/package.json create mode 100644 node_modules/@octokit/request/package.json create mode 100644 node_modules/@octokit/rest/LICENSE create mode 100644 node_modules/@octokit/rest/README.md create mode 100644 node_modules/@octokit/rest/index.d.ts create mode 100644 node_modules/@octokit/rest/index.js create mode 100644 node_modules/@octokit/rest/lib/constructor.js create mode 100644 node_modules/@octokit/rest/lib/core.js create mode 100644 node_modules/@octokit/rest/lib/factory.js create mode 100644 node_modules/@octokit/rest/lib/parse-client-options.js create mode 100644 node_modules/@octokit/rest/lib/register-plugin.js create mode 100644 node_modules/@octokit/rest/package.json create mode 100644 node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js create mode 100644 node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js create mode 100644 node_modules/@octokit/rest/plugins/authentication-deprecated/index.js create mode 100644 node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js create mode 100644 node_modules/@octokit/rest/plugins/authentication/before-request.js create mode 100644 node_modules/@octokit/rest/plugins/authentication/index.js create mode 100644 node_modules/@octokit/rest/plugins/authentication/request-error.js create mode 100644 node_modules/@octokit/rest/plugins/authentication/validate.js create mode 100644 node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js create mode 100644 node_modules/@octokit/rest/plugins/log/index.js create mode 100644 node_modules/@octokit/rest/plugins/pagination/index.js create mode 100644 node_modules/@octokit/rest/plugins/pagination/iterator.js create mode 100644 node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js create mode 100644 node_modules/@octokit/rest/plugins/pagination/paginate.js create mode 100644 node_modules/@octokit/rest/plugins/register-endpoints/index.js create mode 100644 node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js create mode 100644 node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js create mode 100644 node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json create mode 100644 node_modules/@octokit/rest/plugins/validate/index.js create mode 100644 node_modules/@octokit/rest/plugins/validate/validate.js create mode 100644 node_modules/@octokit/types/LICENSE create mode 100644 node_modules/@octokit/types/README.md create mode 100644 node_modules/@octokit/types/package.json create mode 100644 node_modules/@octokit/types/src/AuthInterface.ts create mode 100644 node_modules/@octokit/types/src/EndpointDefaults.ts create mode 100644 node_modules/@octokit/types/src/EndpointInterface.ts create mode 100644 node_modules/@octokit/types/src/EndpointOptions.ts create mode 100644 node_modules/@octokit/types/src/Fetch.ts create mode 100644 node_modules/@octokit/types/src/OctokitResponse.ts create mode 100644 node_modules/@octokit/types/src/RequestHeaders.ts create mode 100644 node_modules/@octokit/types/src/RequestInterface.ts create mode 100644 node_modules/@octokit/types/src/RequestMethod.ts create mode 100644 node_modules/@octokit/types/src/RequestOptions.ts create mode 100644 node_modules/@octokit/types/src/RequestParameters.ts create mode 100644 node_modules/@octokit/types/src/RequestRequestOptions.ts create mode 100644 node_modules/@octokit/types/src/ResponseHeaders.ts create mode 100644 node_modules/@octokit/types/src/Route.ts create mode 100644 node_modules/@octokit/types/src/Signal.ts create mode 100644 node_modules/@octokit/types/src/StrategyInterface.ts create mode 100644 node_modules/@octokit/types/src/Url.ts create mode 100644 node_modules/@octokit/types/src/VERSION.ts create mode 100644 node_modules/@octokit/types/src/generated/Endpoints.ts create mode 100644 node_modules/@octokit/types/src/generated/README.md create mode 100644 node_modules/@octokit/types/src/index.ts create mode 100644 node_modules/@types/node/LICENSE create mode 100644 node_modules/@types/node/README.md create mode 100644 node_modules/@types/node/assert.d.ts create mode 100644 node_modules/@types/node/async_hooks.d.ts create mode 100644 node_modules/@types/node/base.d.ts create mode 100644 node_modules/@types/node/buffer.d.ts create mode 100644 node_modules/@types/node/child_process.d.ts create mode 100644 node_modules/@types/node/cluster.d.ts create mode 100644 node_modules/@types/node/console.d.ts create mode 100644 node_modules/@types/node/constants.d.ts create mode 100644 node_modules/@types/node/crypto.d.ts create mode 100644 node_modules/@types/node/dgram.d.ts create mode 100644 node_modules/@types/node/dns.d.ts create mode 100644 node_modules/@types/node/domain.d.ts create mode 100644 node_modules/@types/node/events.d.ts create mode 100644 node_modules/@types/node/fs.d.ts create mode 100644 node_modules/@types/node/globals.d.ts create mode 100644 node_modules/@types/node/http.d.ts create mode 100644 node_modules/@types/node/http2.d.ts create mode 100644 node_modules/@types/node/https.d.ts create mode 100644 node_modules/@types/node/index.d.ts create mode 100644 node_modules/@types/node/inspector.d.ts create mode 100644 node_modules/@types/node/module.d.ts create mode 100644 node_modules/@types/node/net.d.ts create mode 100644 node_modules/@types/node/os.d.ts create mode 100644 node_modules/@types/node/package.json create mode 100644 node_modules/@types/node/path.d.ts create mode 100644 node_modules/@types/node/perf_hooks.d.ts create mode 100644 node_modules/@types/node/process.d.ts create mode 100644 node_modules/@types/node/punycode.d.ts create mode 100644 node_modules/@types/node/querystring.d.ts create mode 100644 node_modules/@types/node/readline.d.ts create mode 100644 node_modules/@types/node/repl.d.ts create mode 100644 node_modules/@types/node/stream.d.ts create mode 100644 node_modules/@types/node/string_decoder.d.ts create mode 100644 node_modules/@types/node/timers.d.ts create mode 100644 node_modules/@types/node/tls.d.ts create mode 100644 node_modules/@types/node/trace_events.d.ts create mode 100644 node_modules/@types/node/ts3.2/fs.d.ts create mode 100644 node_modules/@types/node/ts3.2/globals.d.ts create mode 100644 node_modules/@types/node/ts3.2/index.d.ts create mode 100644 node_modules/@types/node/ts3.2/util.d.ts create mode 100644 node_modules/@types/node/tty.d.ts create mode 100644 node_modules/@types/node/url.d.ts create mode 100644 node_modules/@types/node/util.d.ts create mode 100644 node_modules/@types/node/v8.d.ts create mode 100644 node_modules/@types/node/vm.d.ts create mode 100644 node_modules/@types/node/worker_threads.d.ts create mode 100644 node_modules/@types/node/zlib.d.ts create mode 100644 node_modules/atob-lite/LICENSE.md create mode 100644 node_modules/atob-lite/README.md create mode 100644 node_modules/atob-lite/atob-browser.js create mode 100644 node_modules/atob-lite/atob-node.js create mode 100644 node_modules/atob-lite/package.json create mode 100644 node_modules/balanced-match/LICENSE.md create mode 100644 node_modules/balanced-match/README.md create mode 100644 node_modules/balanced-match/index.js create mode 100644 node_modules/balanced-match/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/brace-expansion/LICENSE create mode 100644 node_modules/brace-expansion/README.md create mode 100644 node_modules/brace-expansion/index.js create mode 100644 node_modules/brace-expansion/package.json create mode 100644 node_modules/btoa-lite/LICENSE.md create mode 100644 node_modules/btoa-lite/README.md create mode 100644 node_modules/btoa-lite/btoa-browser.js create mode 100644 node_modules/btoa-lite/btoa-node.js create mode 100644 node_modules/btoa-lite/package.json create mode 100644 node_modules/concat-map/LICENSE create mode 100644 node_modules/concat-map/README.markdown create mode 100644 node_modules/concat-map/example/map.js create mode 100644 node_modules/concat-map/index.js create mode 100644 node_modules/concat-map/package.json create mode 100644 node_modules/concat-map/test/map.js create mode 100644 node_modules/cross-spawn/CHANGELOG.md create mode 100644 node_modules/cross-spawn/LICENSE create mode 100644 node_modules/cross-spawn/README.md create mode 100644 node_modules/cross-spawn/index.js create mode 100644 node_modules/cross-spawn/lib/enoent.js create mode 100644 node_modules/cross-spawn/lib/parse.js create mode 100644 node_modules/cross-spawn/lib/util/escape.js create mode 100644 node_modules/cross-spawn/lib/util/readShebang.js create mode 100644 node_modules/cross-spawn/lib/util/resolveCommand.js create mode 100644 node_modules/cross-spawn/node_modules/semver/CHANGELOG.md create mode 100644 node_modules/cross-spawn/node_modules/semver/LICENSE create mode 100644 node_modules/cross-spawn/node_modules/semver/README.md create mode 100755 node_modules/cross-spawn/node_modules/semver/bin/semver create mode 100644 node_modules/cross-spawn/node_modules/semver/package.json create mode 100644 node_modules/cross-spawn/node_modules/semver/range.bnf create mode 100644 node_modules/cross-spawn/node_modules/semver/semver.js create mode 100644 node_modules/cross-spawn/package.json 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/end-of-stream/LICENSE create mode 100644 node_modules/end-of-stream/README.md create mode 100644 node_modules/end-of-stream/index.js create mode 100644 node_modules/end-of-stream/package.json create mode 100644 node_modules/execa/index.js create mode 100644 node_modules/execa/lib/errname.js create mode 100644 node_modules/execa/lib/stdio.js create mode 100644 node_modules/execa/license create mode 100644 node_modules/execa/package.json create mode 100644 node_modules/execa/readme.md create mode 100644 node_modules/get-stream/buffer-stream.js create mode 100644 node_modules/get-stream/index.js create mode 100644 node_modules/get-stream/license create mode 100644 node_modules/get-stream/package.json create mode 100644 node_modules/get-stream/readme.md create mode 100644 node_modules/is-stream/index.js create mode 100644 node_modules/is-stream/license create mode 100644 node_modules/is-stream/package.json create mode 100644 node_modules/is-stream/readme.md create mode 100644 node_modules/isexe/LICENSE create mode 100644 node_modules/isexe/README.md create mode 100644 node_modules/isexe/index.js create mode 100644 node_modules/isexe/mode.js create mode 100644 node_modules/isexe/package.json create mode 100644 node_modules/isexe/test/basic.js create mode 100644 node_modules/isexe/windows.js create mode 100644 node_modules/lodash.get/LICENSE create mode 100644 node_modules/lodash.get/README.md create mode 100644 node_modules/lodash.get/index.js create mode 100644 node_modules/lodash.get/package.json create mode 100644 node_modules/lodash.set/LICENSE create mode 100644 node_modules/lodash.set/README.md create mode 100644 node_modules/lodash.set/index.js create mode 100644 node_modules/lodash.set/package.json create mode 100644 node_modules/lodash.uniq/LICENSE create mode 100644 node_modules/lodash.uniq/README.md create mode 100644 node_modules/lodash.uniq/index.js create mode 100644 node_modules/lodash.uniq/package.json create mode 100644 node_modules/macos-release/index.d.ts create mode 100644 node_modules/macos-release/index.js create mode 100644 node_modules/macos-release/license create mode 100644 node_modules/macos-release/package.json create mode 100644 node_modules/macos-release/readme.md create mode 100644 node_modules/mime-db/HISTORY.md create mode 100644 node_modules/mime-db/LICENSE create mode 100644 node_modules/mime-db/README.md create mode 100644 node_modules/mime-db/db.json create mode 100644 node_modules/mime-db/index.js create mode 100644 node_modules/mime-db/package.json create mode 100644 node_modules/mime-types/HISTORY.md create mode 100644 node_modules/mime-types/LICENSE create mode 100644 node_modules/mime-types/README.md create mode 100644 node_modules/mime-types/index.js create mode 100644 node_modules/mime-types/package.json create mode 100644 node_modules/minimatch/LICENSE create mode 100644 node_modules/minimatch/README.md create mode 100644 node_modules/minimatch/minimatch.js create mode 100644 node_modules/minimatch/package.json create mode 100644 node_modules/nice-try/CHANGELOG.md create mode 100644 node_modules/nice-try/LICENSE create mode 100644 node_modules/nice-try/README.md create mode 100644 node_modules/nice-try/package.json create mode 100644 node_modules/nice-try/src/index.js create mode 100644 node_modules/npm-run-path/index.js create mode 100644 node_modules/npm-run-path/license create mode 100644 node_modules/npm-run-path/package.json create mode 100644 node_modules/npm-run-path/readme.md create mode 100644 node_modules/octokit-pagination-methods/CODE_OF_CONDUCT.md create mode 100644 node_modules/octokit-pagination-methods/LICENSE create mode 100644 node_modules/octokit-pagination-methods/README.md create mode 100644 node_modules/octokit-pagination-methods/index.js create mode 100644 node_modules/octokit-pagination-methods/lib/deprecate.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-first-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-last-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-next-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-page-links.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-previous-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/has-first-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/has-last-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/has-next-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/has-previous-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/http-error.js create mode 100644 node_modules/octokit-pagination-methods/package.json create mode 100644 node_modules/octokit-pagination-methods/test.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/os-name/index.d.ts create mode 100644 node_modules/os-name/index.js create mode 100644 node_modules/os-name/license create mode 100644 node_modules/os-name/package.json create mode 100644 node_modules/os-name/readme.md create mode 100644 node_modules/p-finally/index.js create mode 100644 node_modules/p-finally/license create mode 100644 node_modules/p-finally/package.json create mode 100644 node_modules/p-finally/readme.md create mode 100644 node_modules/path-key/index.js create mode 100644 node_modules/path-key/license create mode 100644 node_modules/path-key/package.json create mode 100644 node_modules/path-key/readme.md create mode 100644 node_modules/pump/LICENSE create mode 100644 node_modules/pump/README.md create mode 100644 node_modules/pump/index.js create mode 100644 node_modules/pump/package.json create mode 100644 node_modules/pump/test-browser.js create mode 100644 node_modules/pump/test-node.js create mode 100644 node_modules/shebang-command/index.js create mode 100644 node_modules/shebang-command/license create mode 100644 node_modules/shebang-command/package.json create mode 100644 node_modules/shebang-command/readme.md create mode 100644 node_modules/shebang-regex/index.js create mode 100644 node_modules/shebang-regex/license create mode 100644 node_modules/shebang-regex/package.json create mode 100644 node_modules/shebang-regex/readme.md create mode 100644 node_modules/signal-exit/CHANGELOG.md create mode 100644 node_modules/signal-exit/LICENSE.txt create mode 100644 node_modules/signal-exit/README.md create mode 100644 node_modules/signal-exit/index.js create mode 100644 node_modules/signal-exit/package.json create mode 100644 node_modules/signal-exit/signals.js create mode 100644 node_modules/strip-eof/index.js create mode 100644 node_modules/strip-eof/license create mode 100644 node_modules/strip-eof/package.json create mode 100644 node_modules/strip-eof/readme.md 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/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/browser.js create mode 100644 node_modules/universal-user-agent/dist-src/index.js create mode 100644 node_modules/universal-user-agent/dist-src/node.js create mode 100644 node_modules/universal-user-agent/dist-types/browser.d.ts create mode 100644 node_modules/universal-user-agent/dist-types/index.d.ts create mode 100644 node_modules/universal-user-agent/dist-types/node.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/which/CHANGELOG.md create mode 100644 node_modules/which/LICENSE create mode 100644 node_modules/which/README.md create mode 100755 node_modules/which/bin/which create mode 100644 node_modules/which/package.json create mode 100644 node_modules/which/which.js create mode 100644 node_modules/windows-release/index.d.ts create mode 100644 node_modules/windows-release/index.js create mode 100644 node_modules/windows-release/license create mode 100644 node_modules/windows-release/package.json create mode 100644 node_modules/windows-release/readme.md 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/.gitignore b/.gitignore index f9e333ec..378e5b57 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ # comment out in distribution branches -/node_modules/ -/bin/ -/lib/ # Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore # Logs diff --git a/lib/main.js b/lib/main.js new file mode 100644 index 00000000..3917d6df --- /dev/null +++ b/lib/main.js @@ -0,0 +1,47 @@ +"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()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +const upload_release_asset_1 = require("./upload-release-asset"); +const github_1 = require("@actions/github"); +function run() { + return __awaiter(this, void 0, void 0, function* () { + try { + const github_token = core.getInput('github_token', { required: true }); + const upload_url = core.getInput('upload_url', { required: true }); + const asset_path = core.getInput('asset_path', { required: true }); + const asset_name = core.getInput('asset_name'); + const asset_content_type = core.getInput('asset_content_type'); + // bug? ReposUploadReleaseAssetResponse doesn't match actual response. + // so ignore types + const github = new github_1.GitHub(github_token); + const output = yield upload_release_asset_1.upload({ + github, + upload_url, + asset_path, + asset_name, + asset_content_type + }); + core.setOutput('browser_download_url', output.browser_download_url); + } + catch (error) { + core.setFailed(error.message); + } + }); +} +run(); diff --git a/lib/upload-release-asset.js b/lib/upload-release-asset.js new file mode 100644 index 00000000..599f2c5c --- /dev/null +++ b/lib/upload-release-asset.js @@ -0,0 +1,56 @@ +"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()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +const glob = __importStar(require("@actions/glob")); +const fs = __importStar(require("fs")); +const path = __importStar(require("path")); +const mime = __importStar(require("mime-types")); +function upload(opts) { + return __awaiter(this, void 0, void 0, function* () { + const github = opts.github; + const globber = yield glob.create(opts.asset_path); + const files = yield globber.glob(); + if (files.length > 1 && opts.asset_name !== '') { + throw new Error('validation error, cannot upload multiple files with asset_name option'); + } + const urls = yield Promise.all(files.map((file) => __awaiter(this, void 0, void 0, function* () { + const name = opts.asset_name !== '' ? opts.asset_name : path.basename(file); + const content_type = opts.asset_content_type !== '' + ? opts.asset_content_type + : mime.lookup(file) || 'application/octet-stream'; + const stat = fs.statSync(file); + core.info(`uploading ${file} as ${name}: size: ${stat.size}`); + const response = yield github.repos.uploadReleaseAsset({ + url: opts.upload_url, + headers: { + 'content-type': content_type, + 'content-length': stat.size + }, + name: name, + file: fs.readFileSync(file) + }); + core.debug(JSON.stringify(response)); + return response.data.browser_download_url; + }))); + return { + browser_download_url: urls.join('\n') + }; + }); +} +exports.upload = upload; diff --git a/node_modules/@actions/core/README.md b/node_modules/@actions/core/README.md new file mode 100644 index 00000000..457f73cc --- /dev/null +++ b/node_modules/@actions/core/README.md @@ -0,0 +1,140 @@ +# `@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`. 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 }); + +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'); + } + + // Do stuff +} +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 +}) +``` + +#### 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); +``` \ No newline at end of file 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 00000000..7f6fecbe --- /dev/null +++ b/node_modules/@actions/core/lib/command.d.ts @@ -0,0 +1,16 @@ +interface CommandProperties { + [key: string]: string; +} +/** + * Commands + * + * Command Format: + * ##[name key=value;key=value]message + * + * Examples: + * ##[warning]This is the user warning message + * ##[set-secret name=mypassword]definitelyNotAPassword! + */ +export declare function issueCommand(command: string, properties: CommandProperties, message: string): void; +export declare function issue(name: string, message?: string): void; +export {}; diff --git a/node_modules/@actions/core/lib/command.js b/node_modules/@actions/core/lib/command.js new file mode 100644 index 00000000..b0ea009a --- /dev/null +++ b/node_modules/@actions/core/lib/command.js @@ -0,0 +1,66 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const os = require("os"); +/** + * Commands + * + * Command Format: + * ##[name key=value;key=value]message + * + * Examples: + * ##[warning]This is the user warning message + * ##[set-secret name=mypassword]definitelyNotAPassword! + */ +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 += ' '; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + // safely append the val - avoid blowing up when attempting to + // call .replace() if message is not a string for some reason + cmdStr += `${key}=${escape(`${val || ''}`)},`; + } + } + } + } + cmdStr += CMD_STRING; + // safely append the message - avoid blowing up when attempting to + // call .replace() if message is not a string for some reason + const message = `${this.message || ''}`; + cmdStr += escapeData(message); + return cmdStr; + } +} +function escapeData(s) { + return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A'); +} +function escape(s) { + return s + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/]/g, '%5D') + .replace(/;/g, '%3B'); +} +//# 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 00000000..918ab25b --- /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,yBAAwB;AAQxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAe;IAEf,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,UAAkB,EAAE;IACtD,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,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,8DAA8D;wBAC9D,6DAA6D;wBAC7D,MAAM,IAAI,GAAG,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,CAAA;qBAC9C;iBACF;aACF;SACF;QAED,MAAM,IAAI,UAAU,CAAA;QAEpB,kEAAkE;QAClE,6DAA6D;QAC7D,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,CAAA;QACvC,MAAM,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;QAE7B,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AACtD,CAAC;AAED,SAAS,MAAM,CAAC,CAAS;IACvB,OAAO,CAAC;SACL,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 00000000..6483c3ca --- /dev/null +++ b/node_modules/@actions/core/lib/core.d.ts @@ -0,0 +1,112 @@ +/** + * 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; +} +/** + * 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 +} +/** + * 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 + */ +export declare function exportVariable(name: string, val: string): 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. The value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +export declare function getInput(name: string, options?: InputOptions): string; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store + */ +export declare function setOutput(name: string, value: string): 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): void; +/** + * 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 + */ +export declare function error(message: string): void; +/** + * Adds an warning issue + * @param message warning issue message + */ +export declare function warning(message: string): 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 + */ +export declare function saveState(name: string, value: string): 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; diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js new file mode 100644 index 00000000..f43d507b --- /dev/null +++ b/node_modules/@actions/core/lib/core.js @@ -0,0 +1,195 @@ +"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 }); +const command_1 = require("./command"); +const os = require("os"); +const path = require("path"); +/** + * 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 + */ +function exportVariable(name, val) { + process.env[name] = val; + command_1.issueCommand('set-env', { name }, val); +} +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) { + command_1.issueCommand('add-path', {}, inputPath); + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. The value is also trimmed. + * + * @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}`); + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store + */ +function setOutput(name, value) { + command_1.issueCommand('set-output', { name }, value); +} +exports.setOutput = setOutput; +//----------------------------------------------------------------------- +// 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 +//----------------------------------------------------------------------- +/** + * 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 + */ +function error(message) { + command_1.issue('error', message); +} +exports.error = error; +/** + * Adds an warning issue + * @param message warning issue message + */ +function warning(message) { + command_1.issue('warning', message); +} +exports.warning = warning; +/** + * 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 + */ +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; +//# 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 00000000..6eda8daa --- /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;AAE7C,yBAAwB;AACxB,6BAA4B;AAU5B;;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;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wCAGC;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,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;IACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AAHD,0BAGC;AAED;;;;;;GAMG;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,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AARD,4BAQC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED,yEAAyE;AACzE,UAAU;AACV,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAe;IACvC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;IACnC,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC;AAHD,8BAGC;AAED,yEAAyE;AACzE,mBAAmB;AACnB,yEAAyE;AAEzE;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,sBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,eAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;AACzB,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,OAAe;IACrC,eAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;AAC3B,CAAC;AAFD,0BAEC;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,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,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"} \ 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 00000000..4646dada --- /dev/null +++ b/node_modules/@actions/core/package.json @@ -0,0 +1,68 @@ +{ + "_args": [ + [ + "@actions/core@1.2.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@actions/core@1.2.0", + "_id": "@actions/core@1.2.0", + "_inBundle": false, + "_integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw==", + "_location": "/@actions/core", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/core@1.2.0", + "name": "@actions/core", + "escapedName": "@actions%2fcore", + "scope": "@actions", + "rawSpec": "1.2.0", + "saveSpec": null, + "fetchSpec": "1.2.0" + }, + "_requiredBy": [ + "/", + "/@actions/glob" + ], + "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz", + "_spec": "1.2.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "description": "Actions core lib", + "devDependencies": { + "@types/node": "^12.0.2" + }, + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/actions/toolkit/tree/master/packages/core", + "keywords": [ + "github", + "actions", + "core" + ], + "license": "MIT", + "main": "lib/core.js", + "name": "@actions/core", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/core" + }, + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1", + "tsc": "tsc" + }, + "version": "1.2.0" +} diff --git a/node_modules/@actions/github/README.md b/node_modules/@actions/github/README.md new file mode 100644 index 00000000..d6cf49b1 --- /dev/null +++ b/node_modules/@actions/github/README.md @@ -0,0 +1,74 @@ +# `@actions/github` + +> A hydrated Octokit client. + +## Usage + +Returns an authenticated Octokit client that follows the machine [proxy settings](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#using-a-proxy-server-with-self-hosted-runners). 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 = new github.GitHub(myToken); + + const { data: pullRequest } = await octokit.pulls.get({ + owner: 'octokit', + repo: 'rest.js', + pull_number: 123, + mediaType: { + format: 'diff' + } + }); + + console.log(pullRequest); +} + +run(); +``` + +You can pass client options, as specified by [Octokit](https://octokit.github.io/rest.js/), as a second argument to the `GitHub` constructor. + +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.issues.create({ + ...context.repo, + title: 'New issue!', + body: 'Hello Universe!' +}); +``` + +## Webhook payload typescript definitions + +The npm module `@octokit/webhooks` 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` + +Then, assert the type based on the eventName +```ts +import * as core from '@actions/core' +import * as github from '@actions/github' +import * as Webhooks from '@octokit/webhooks' +if (github.context.eventName === 'push') { + const pushPayload = github.context.payload as Webhooks.WebhookPayloadPush + core.info(`The head commit is: ${pushPayload.head}`) +} +``` 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 00000000..434fdb12 --- /dev/null +++ b/node_modules/@actions/github/lib/context.d.ts @@ -0,0 +1,26 @@ +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; + /** + * 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 00000000..25ceea5a --- /dev/null +++ b/node_modules/@actions/github/lib/context.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs_1 = require("fs"); +const os_1 = require("os"); +class Context { + /** + * Hydrate the context from the environment + */ + constructor() { + 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; + } + 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 00000000..d05ca0d3 --- /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;IAalB;;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;IACjD,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;AA9DD,0BA8DC"} \ 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 00000000..08f6c48e --- /dev/null +++ b/node_modules/@actions/github/lib/github.d.ts @@ -0,0 +1,25 @@ +import { graphql as GraphQL } from '@octokit/graphql/dist-types/types'; +import Octokit from '@octokit/rest'; +import * as Context from './context'; +export declare const context: Context.Context; +export declare class GitHub extends Octokit { + graphql: GraphQL; + /** + * Sets up the REST client and GraphQL client with auth and proxy support. + * The parameter `token` or `opts.auth` must be supplied. The GraphQL client + * authorization is not setup when `opts.auth` is a function or object. + * + * @param token Auth token + * @param opts Octokit options + */ + constructor(token: string, opts?: Omit); + constructor(opts: Octokit.Options); + /** + * Disambiguates the constructor overload parameters + */ + private static disambiguate; + private static getOctokitOptions; + private static getGraphQL; + private static getAuthString; + private static getProxyAgent; +} diff --git a/node_modules/@actions/github/lib/github.js b/node_modules/@actions/github/lib/github.js new file mode 100644 index 00000000..06cb4e6e --- /dev/null +++ b/node_modules/@actions/github/lib/github.js @@ -0,0 +1,94 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/github.ts +const graphql_1 = require("@octokit/graphql"); +const rest_1 = __importDefault(require("@octokit/rest")); +const Context = __importStar(require("./context")); +const httpClient = __importStar(require("@actions/http-client")); +// We need this in order to extend Octokit +rest_1.default.prototype = new rest_1.default(); +exports.context = new Context.Context(); +class GitHub extends rest_1.default { + constructor(token, opts) { + super(GitHub.getOctokitOptions(GitHub.disambiguate(token, opts))); + this.graphql = GitHub.getGraphQL(GitHub.disambiguate(token, opts)); + } + /** + * Disambiguates the constructor overload parameters + */ + static disambiguate(token, opts) { + return [ + typeof token === 'string' ? token : '', + typeof token === 'object' ? token : opts || {} + ]; + } + static getOctokitOptions(args) { + const token = args[0]; + const options = Object.assign({}, args[1]); // Shallow clone - don't mutate the object provided by the caller + // Auth + const auth = GitHub.getAuthString(token, options); + if (auth) { + options.auth = auth; + } + // Proxy + const agent = GitHub.getProxyAgent(options); + if (agent) { + // Shallow clone - don't mutate the object provided by the caller + options.request = options.request ? Object.assign({}, options.request) : {}; + // Set the agent + options.request.agent = agent; + } + return options; + } + static getGraphQL(args) { + const defaults = {}; + const token = args[0]; + const options = args[1]; + // Authorization + const auth = this.getAuthString(token, options); + if (auth) { + defaults.headers = { + authorization: auth + }; + } + // Proxy + const agent = GitHub.getProxyAgent(options); + if (agent) { + defaults.request = { agent }; + } + return graphql_1.graphql.defaults(defaults); + } + static getAuthString(token, options) { + // Validate args + 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}`; + } + static getProxyAgent(options) { + var _a; + if (!((_a = options.request) === null || _a === void 0 ? void 0 : _a.agent)) { + const serverUrl = 'https://api.github.com'; + if (httpClient.getProxyUrl(serverUrl)) { + const hc = new httpClient.HttpClient(); + return hc.getAgent(serverUrl); + } + } + return undefined; + } +} +exports.GitHub = GitHub; +//# 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 00000000..f757f4d8 --- /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,gGAAgG;AAChG,8CAAwC;AAUxC,yDAAmC;AACnC,mDAAoC;AAEpC,iEAAkD;AAElD,0CAA0C;AAC1C,cAAO,CAAC,SAAS,GAAG,IAAI,cAAO,EAAE,CAAA;AAEpB,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C,MAAa,MAAO,SAAQ,cAAO;IAiBjC,YAAY,KAA+B,EAAE,IAAsB;QACjE,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;QAEjE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAA;IACpE,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,YAAY,CACzB,KAA+B,EAC/B,IAAsB;QAEtB,OAAO;YACL,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YACtC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE;SAC/C,CAAA;IACH,CAAC;IAEO,MAAM,CAAC,iBAAiB,CAC9B,IAA+B;QAE/B,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QACrB,MAAM,OAAO,qBAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,iEAAiE;QAE9F,OAAO;QACP,MAAM,IAAI,GAAG,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QACjD,IAAI,IAAI,EAAE;YACR,OAAO,CAAC,IAAI,GAAG,IAAI,CAAA;SACpB;QAED,QAAQ;QACR,MAAM,KAAK,GAAG,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAC3C,IAAI,KAAK,EAAE;YACT,iEAAiE;YACjE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,mBAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAA;YAE7D,gBAAgB;YAChB,OAAO,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAA;SAC9B;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;IAEO,MAAM,CAAC,UAAU,CAAC,IAA+B;QACvD,MAAM,QAAQ,GAA6B,EAAE,CAAA;QAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QACrB,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QAEvB,gBAAgB;QAChB,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAC/C,IAAI,IAAI,EAAE;YACR,QAAQ,CAAC,OAAO,GAAG;gBACjB,aAAa,EAAE,IAAI;aACpB,CAAA;SACF;QAED,QAAQ;QACR,MAAM,KAAK,GAAG,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAC3C,IAAI,KAAK,EAAE;YACT,QAAQ,CAAC,OAAO,GAAG,EAAC,KAAK,EAAC,CAAA;SAC3B;QAED,OAAO,iBAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IACnC,CAAC;IAEO,MAAM,CAAC,aAAa,CAC1B,KAAa,EACb,OAAwB;QAExB,gBAAgB;QAChB,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAA;SAC5D;aAAM,IAAI,KAAK,IAAI,OAAO,CAAC,IAAI,EAAE;YAChC,MAAM,IAAI,KAAK,CACb,0DAA0D,CAC3D,CAAA;SACF;QAED,OAAO,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,CAAA;IAC3E,CAAC;IAEO,MAAM,CAAC,aAAa,CAC1B,OAAwB;;QAExB,IAAI,QAAC,OAAO,CAAC,OAAO,0CAAE,KAAK,CAAA,EAAE;YAC3B,MAAM,SAAS,GAAG,wBAAwB,CAAA;YAC1C,IAAI,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;gBACrC,MAAM,EAAE,GAAG,IAAI,UAAU,CAAC,UAAU,EAAE,CAAA;gBACtC,OAAO,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;aAC9B;SACF;QAED,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AAhHD,wBAgHC"} \ 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 00000000..23788cce --- /dev/null +++ b/node_modules/@actions/github/lib/interfaces.d.ts @@ -0,0 +1,36 @@ +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; + }; +} diff --git a/node_modules/@actions/github/lib/interfaces.js b/node_modules/@actions/github/lib/interfaces.js new file mode 100644 index 00000000..a660b5e3 --- /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 00000000..dc2c9609 --- /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/package.json b/node_modules/@actions/github/package.json new file mode 100644 index 00000000..3bab0646 --- /dev/null +++ b/node_modules/@actions/github/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + "@actions/github@2.1.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@actions/github@2.1.0", + "_id": "@actions/github@2.1.0", + "_inBundle": false, + "_integrity": "sha512-G4ncMlh4pLLAvNgHUYUtpWQ1zPf/VYqmRH9oshxLabdaOOnp7i1hgSgzr2xne2YUaSND3uqemd3YYTIsm2f/KQ==", + "_location": "/@actions/github", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/github@2.1.0", + "name": "@actions/github", + "escapedName": "@actions%2fgithub", + "scope": "@actions", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/@actions/github/-/github-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@actions/http-client": "^1.0.3", + "@octokit/graphql": "^4.3.1", + "@octokit/rest": "^16.15.0" + }, + "description": "Actions github lib", + "devDependencies": { + "jest": "^24.7.1", + "proxy": "^1.0.1" + }, + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/actions/toolkit/tree/master/packages/github", + "keywords": [ + "github", + "actions" + ], + "license": "MIT", + "main": "lib/github.js", + "name": "@actions/github", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/github" + }, + "scripts": { + "audit-moderate": "npm install && npm audit --audit-level=moderate", + "build": "tsc", + "format": "prettier --write **/*.ts", + "format-check": "prettier --check **/*.ts", + "test": "jest", + "tsc": "tsc" + }, + "types": "lib/github.d.ts", + "version": "2.1.0" +} diff --git a/node_modules/@actions/glob/lib/glob.d.ts b/node_modules/@actions/glob/lib/glob.d.ts new file mode 100644 index 00000000..56424fc3 --- /dev/null +++ b/node_modules/@actions/glob/lib/glob.d.ts @@ -0,0 +1,10 @@ +import { Globber } from './internal-globber'; +import { GlobOptions } from './internal-glob-options'; +export { Globber, GlobOptions }; +/** + * Constructs a globber + * + * @param patterns Patterns separated by newlines + * @param options Glob options + */ +export declare function create(patterns: string, options?: GlobOptions): Promise; diff --git a/node_modules/@actions/glob/lib/glob.js b/node_modules/@actions/glob/lib/glob.js new file mode 100644 index 00000000..ea8f15a2 --- /dev/null +++ b/node_modules/@actions/glob/lib/glob.js @@ -0,0 +1,25 @@ +"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 }); +const internal_globber_1 = require("./internal-globber"); +/** + * Constructs a globber + * + * @param patterns Patterns separated by newlines + * @param options Glob options + */ +function create(patterns, options) { + return __awaiter(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); +} +exports.create = create; +//# sourceMappingURL=glob.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/glob.js.map b/node_modules/@actions/glob/lib/glob.js.map new file mode 100644 index 00000000..91c910b5 --- /dev/null +++ b/node_modules/@actions/glob/lib/glob.js.map @@ -0,0 +1 @@ +{"version":3,"file":"glob.js","sourceRoot":"","sources":["../src/glob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yDAA0D;AAK1D;;;;;GAKG;AACH,SAAsB,MAAM,CAC1B,QAAgB,EAChB,OAAqB;;QAErB,OAAO,MAAM,iCAAc,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IACvD,CAAC;CAAA;AALD,wBAKC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-glob-options-helper.d.ts b/node_modules/@actions/glob/lib/internal-glob-options-helper.d.ts new file mode 100644 index 00000000..8a789606 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options-helper.d.ts @@ -0,0 +1,5 @@ +import { GlobOptions } from './internal-glob-options'; +/** + * Returns a copy with defaults filled in. + */ +export declare function getOptions(copy?: GlobOptions): GlobOptions; diff --git a/node_modules/@actions/glob/lib/internal-glob-options-helper.js b/node_modules/@actions/glob/lib/internal-glob-options-helper.js new file mode 100644 index 00000000..8284b760 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options-helper.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = require("@actions/core"); +/** + * Returns a copy with defaults filled in. + */ +function getOptions(copy) { + const result = { + followSymbolicLinks: true, + implicitDescendants: true, + omitBrokenSymbolicLinks: true + }; + if (copy) { + if (typeof copy.followSymbolicLinks === 'boolean') { + result.followSymbolicLinks = copy.followSymbolicLinks; + core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + } + if (typeof copy.implicitDescendants === 'boolean') { + result.implicitDescendants = copy.implicitDescendants; + core.debug(`implicitDescendants '${result.implicitDescendants}'`); + } + if (typeof copy.omitBrokenSymbolicLinks === 'boolean') { + result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; + core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + } + } + return result; +} +exports.getOptions = getOptions; +//# sourceMappingURL=internal-glob-options-helper.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-glob-options-helper.js.map b/node_modules/@actions/glob/lib/internal-glob-options-helper.js.map new file mode 100644 index 00000000..33d99764 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options-helper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-glob-options-helper.js","sourceRoot":"","sources":["../src/internal-glob-options-helper.ts"],"names":[],"mappings":";;AAAA,sCAAqC;AAGrC;;GAEG;AACH,SAAgB,UAAU,CAAC,IAAkB;IAC3C,MAAM,MAAM,GAAgB;QAC1B,mBAAmB,EAAE,IAAI;QACzB,mBAAmB,EAAE,IAAI;QACzB,uBAAuB,EAAE,IAAI;KAC9B,CAAA;IAED,IAAI,IAAI,EAAE;QACR,IAAI,OAAO,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE;YACjD,MAAM,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAA;YACrD,IAAI,CAAC,KAAK,CAAC,wBAAwB,MAAM,CAAC,mBAAmB,GAAG,CAAC,CAAA;SAClE;QAED,IAAI,OAAO,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE;YACjD,MAAM,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAA;YACrD,IAAI,CAAC,KAAK,CAAC,wBAAwB,MAAM,CAAC,mBAAmB,GAAG,CAAC,CAAA;SAClE;QAED,IAAI,OAAO,IAAI,CAAC,uBAAuB,KAAK,SAAS,EAAE;YACrD,MAAM,CAAC,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,CAAA;YAC7D,IAAI,CAAC,KAAK,CAAC,4BAA4B,MAAM,CAAC,uBAAuB,GAAG,CAAC,CAAA;SAC1E;KACF;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAzBD,gCAyBC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-glob-options.d.ts b/node_modules/@actions/glob/lib/internal-glob-options.d.ts new file mode 100644 index 00000000..c1cac0f1 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options.d.ts @@ -0,0 +1,29 @@ +/** + * Options to control globbing behavior + */ +export interface GlobOptions { + /** + * Indicates whether to follow symbolic links. Generally should set to false + * when deleting files. + * + * @default true + */ + followSymbolicLinks?: boolean; + /** + * Indicates whether directories that match a glob pattern, should implicitly + * cause all descendant paths to be matched. + * + * For example, given the directory `my-dir`, the following glob patterns + * would produce the same results: `my-dir/**`, `my-dir/`, `my-dir` + * + * @default true + */ + implicitDescendants?: boolean; + /** + * Indicates whether broken symbolic should be ignored and omitted from the + * result set. Otherwise an error will be thrown. + * + * @default true + */ + omitBrokenSymbolicLinks?: boolean; +} diff --git a/node_modules/@actions/glob/lib/internal-glob-options.js b/node_modules/@actions/glob/lib/internal-glob-options.js new file mode 100644 index 00000000..8960c70e --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=internal-glob-options.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-glob-options.js.map b/node_modules/@actions/glob/lib/internal-glob-options.js.map new file mode 100644 index 00000000..dec79532 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-glob-options.js","sourceRoot":"","sources":["../src/internal-glob-options.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-globber.d.ts b/node_modules/@actions/glob/lib/internal-globber.d.ts new file mode 100644 index 00000000..6042cb2c --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-globber.d.ts @@ -0,0 +1,42 @@ +import { GlobOptions } from './internal-glob-options'; +export { GlobOptions }; +/** + * Used to match files and directories + */ +export interface Globber { + /** + * Returns the search path preceeding the first glob segment, from each pattern. + * Duplicates and descendants of other paths are filtered out. + * + * Example 1: The patterns `/foo/*` and `/bar/*` returns `/foo` and `/bar`. + * + * Example 2: The patterns `/foo/*` and `/foo/bar/*` returns `/foo`. + */ + getSearchPaths(): string[]; + /** + * Returns files and directories matching the glob patterns. + * + * Order of the results is not guaranteed. + */ + glob(): Promise; + /** + * Returns files and directories matching the glob patterns. + * + * Order of the results is not guaranteed. + */ + globGenerator(): AsyncGenerator; +} +export declare class DefaultGlobber implements Globber { + private readonly options; + private readonly patterns; + private readonly searchPaths; + private constructor(); + getSearchPaths(): string[]; + glob(): Promise; + globGenerator(): AsyncGenerator; + /** + * Constructs a DefaultGlobber + */ + static create(patterns: string, options?: GlobOptions): Promise; + private static stat; +} diff --git a/node_modules/@actions/glob/lib/internal-globber.js b/node_modules/@actions/glob/lib/internal-globber.js new file mode 100644 index 00000000..0819bcc2 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-globber.js @@ -0,0 +1,215 @@ +"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()); + }); +}; +var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +}; +var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } +var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = require("@actions/core"); +const fs = require("fs"); +const globOptionsHelper = require("./internal-glob-options-helper"); +const path = require("path"); +const patternHelper = require("./internal-pattern-helper"); +const internal_match_kind_1 = require("./internal-match-kind"); +const internal_pattern_1 = require("./internal-pattern"); +const internal_search_state_1 = require("./internal-search-state"); +const IS_WINDOWS = process.platform === 'win32'; +class DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + // Return a copy + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) { + const itemPath = _c.value; + result.push(itemPath); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator(this, arguments, function* globGenerator_1() { + // Fill in defaults options + const options = globOptionsHelper.getOptions(this.options); + // Implicit descendants? + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && + (pattern.trailingSeparator || + pattern.segments[pattern.segments.length - 1] !== '**')) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, pattern.segments.concat('**'))); + } + } + // Push the search paths + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core.debug(`Search path '${searchPath}'`); + // Exists? + try { + // Intentionally using lstat. Detection for broken symlink + // will be performed later (if following symlinks). + yield __await(fs.promises.lstat(searchPath)); + } + catch (err) { + if (err.code === 'ENOENT') { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + // Search + const traversalChain = []; // used to detect cycles + while (stack.length) { + // Pop + const item = stack.pop(); + // Match? + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + // Stat + const stats = yield __await(DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + // Broken symlink, or symlink cycle detected, or no longer exists + if (!stats) { + continue; + } + // Directory + if (stats.isDirectory()) { + // Matched + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await(item.path); + } + // Descend? + else if (!partialMatch) { + continue; + } + // Push the child items in reverse + const childLevel = item.level + 1; + const childItems = (yield __await(fs.promises.readdir(item.path))).map(x => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } + // File + else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter(this, void 0, void 0, function* () { + const result = new DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, '\n'); + patterns = patterns.replace(/\r/g, '\n'); + } + const lines = patterns.split('\n').map(x => x.trim()); + for (const line of lines) { + // Empty or comment + if (!line || line.startsWith('#')) { + continue; + } + // Pattern + else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter(this, void 0, void 0, function* () { + // Note: + // `stat` returns info about the target of a symlink (or symlink chain) + // `lstat` returns info about a symlink itself + let stats; + if (options.followSymbolicLinks) { + try { + // Use `stat` (following symlinks) + stats = yield fs.promises.stat(item.path); + } + catch (err) { + if (err.code === 'ENOENT') { + if (options.omitBrokenSymbolicLinks) { + core.debug(`Broken symlink '${item.path}'`); + return undefined; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } + else { + // Use `lstat` (not following symlinks) + stats = yield fs.promises.lstat(item.path); + } + // Note, isDirectory() returns false for the lstat of a symlink + if (stats.isDirectory() && options.followSymbolicLinks) { + // Get the realpath + const realPath = yield fs.promises.realpath(item.path); + // Fixup the traversal chain to match the item level + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + // Test for a cycle + if (traversalChain.some((x) => x === realPath)) { + core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return undefined; + } + // Update the traversal chain + traversalChain.push(realPath); + } + return stats; + }); + } +} +exports.DefaultGlobber = DefaultGlobber; +//# sourceMappingURL=internal-globber.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-globber.js.map b/node_modules/@actions/glob/lib/internal-globber.js.map new file mode 100644 index 00000000..ed1f8f12 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-globber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-globber.js","sourceRoot":"","sources":["../src/internal-globber.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAqC;AACrC,yBAAwB;AACxB,oEAAmE;AACnE,6BAA4B;AAC5B,2DAA0D;AAE1D,+DAA+C;AAC/C,yDAA0C;AAC1C,mEAAmD;AAEnD,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAiC/C,MAAa,cAAc;IAKzB,YAAoB,OAAqB;QAHxB,aAAQ,GAAc,EAAE,CAAA;QACxB,gBAAW,GAAa,EAAE,CAAA;QAGzC,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IACtD,CAAC;IAED,cAAc;QACZ,gBAAgB;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAA;IACjC,CAAC;IAEK,IAAI;;;YACR,MAAM,MAAM,GAAa,EAAE,CAAA;;gBAC3B,KAA6B,IAAA,KAAA,cAAA,IAAI,CAAC,aAAa,EAAE,CAAA,IAAA;oBAAtC,MAAM,QAAQ,WAAA,CAAA;oBACvB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;iBACtB;;;;;;;;;YACD,OAAO,MAAM,CAAA;;KACd;IAEM,aAAa;;YAClB,2BAA2B;YAC3B,MAAM,OAAO,GAAG,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAE1D,wBAAwB;YACxB,MAAM,QAAQ,GAAc,EAAE,CAAA;YAC9B,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACnC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;gBACtB,IACE,OAAO,CAAC,mBAAmB;oBAC3B,CAAC,OAAO,CAAC,iBAAiB;wBACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,EACzD;oBACA,QAAQ,CAAC,IAAI,CACX,IAAI,0BAAO,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAC3D,CAAA;iBACF;aACF;YAED,wBAAwB;YACxB,MAAM,KAAK,GAAkB,EAAE,CAAA;YAC/B,KAAK,MAAM,UAAU,IAAI,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;gBAC/D,IAAI,CAAC,KAAK,CAAC,gBAAgB,UAAU,GAAG,CAAC,CAAA;gBAEzC,UAAU;gBACV,IAAI;oBACF,0DAA0D;oBAC1D,mDAAmD;oBACnD,cAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA,CAAA;iBACpC;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;wBACzB,SAAQ;qBACT;oBACD,MAAM,GAAG,CAAA;iBACV;gBAED,KAAK,CAAC,OAAO,CAAC,IAAI,mCAAW,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAA;aAC9C;YAED,SAAS;YACT,MAAM,cAAc,GAAa,EAAE,CAAA,CAAC,wBAAwB;YAC5D,OAAO,KAAK,CAAC,MAAM,EAAE;gBACnB,MAAM;gBACN,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAiB,CAAA;gBAEvC,SAAS;gBACT,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;gBACtD,MAAM,YAAY,GAChB,CAAC,CAAC,KAAK,IAAI,aAAa,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;gBAC5D,IAAI,CAAC,KAAK,IAAI,CAAC,YAAY,EAAE;oBAC3B,SAAQ;iBACT;gBAED,OAAO;gBACP,MAAM,KAAK,GAAyB,cAAM,cAAc,CAAC,IAAI,CAC3D,IAAI,EACJ,OAAO,EACP,cAAc,CACf;gBAED,iEAAiE;iBAFhE,CAAA;gBAED,iEAAiE;gBACjE,IAAI,CAAC,KAAK,EAAE;oBACV,SAAQ;iBACT;gBAED,YAAY;gBACZ,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE;oBACvB,UAAU;oBACV,IAAI,KAAK,GAAG,+BAAS,CAAC,SAAS,EAAE;wBAC/B,oBAAM,IAAI,CAAC,IAAI,CAAA,CAAA;qBAChB;oBACD,WAAW;yBACN,IAAI,CAAC,YAAY,EAAE;wBACtB,SAAQ;qBACT;oBAED,kCAAkC;oBAClC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;oBACjC,MAAM,UAAU,GAAG,CAAC,cAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC,GAAG,CAC3D,CAAC,CAAC,EAAE,CAAC,IAAI,mCAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,CAC1D,CAAA;oBACD,KAAK,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;iBACpC;gBACD,OAAO;qBACF,IAAI,KAAK,GAAG,+BAAS,CAAC,IAAI,EAAE;oBAC/B,oBAAM,IAAI,CAAC,IAAI,CAAA,CAAA;iBAChB;aACF;QACH,CAAC;KAAA;IAED;;OAEG;IACH,MAAM,CAAO,MAAM,CACjB,QAAgB,EAChB,OAAqB;;YAErB,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAA;YAE1C,IAAI,UAAU,EAAE;gBACd,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;gBAC1C,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;aACzC;YAED,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;YACrD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACxB,mBAAmB;gBACnB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;oBACjC,SAAQ;iBACT;gBACD,UAAU;qBACL;oBACH,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,0BAAO,CAAC,IAAI,CAAC,CAAC,CAAA;iBACxC;aACF;YAED,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;YACzE,OAAO,MAAM,CAAA;QACf,CAAC;KAAA;IAEO,MAAM,CAAO,IAAI,CACvB,IAAiB,EACjB,OAAoB,EACpB,cAAwB;;YAExB,QAAQ;YACR,uEAAuE;YACvE,8CAA8C;YAC9C,IAAI,KAAe,CAAA;YACnB,IAAI,OAAO,CAAC,mBAAmB,EAAE;gBAC/B,IAAI;oBACF,kCAAkC;oBAClC,KAAK,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;iBAC1C;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;wBACzB,IAAI,OAAO,CAAC,uBAAuB,EAAE;4BACnC,IAAI,CAAC,KAAK,CAAC,mBAAmB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAA;4BAC3C,OAAO,SAAS,CAAA;yBACjB;wBAED,MAAM,IAAI,KAAK,CACb,sCAAsC,IAAI,CAAC,IAAI,8CAA8C,CAC9F,CAAA;qBACF;oBAED,MAAM,GAAG,CAAA;iBACV;aACF;iBAAM;gBACL,uCAAuC;gBACvC,KAAK,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;aAC3C;YAED,+DAA+D;YAC/D,IAAI,KAAK,CAAC,WAAW,EAAE,IAAI,OAAO,CAAC,mBAAmB,EAAE;gBACtD,mBAAmB;gBACnB,MAAM,QAAQ,GAAW,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBAE9D,oDAAoD;gBACpD,OAAO,cAAc,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE;oBAC1C,cAAc,CAAC,GAAG,EAAE,CAAA;iBACrB;gBAED,mBAAmB;gBACnB,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,EAAE;oBACtD,IAAI,CAAC,KAAK,CACR,oCAAoC,IAAI,CAAC,IAAI,mBAAmB,QAAQ,GAAG,CAC5E,CAAA;oBACD,OAAO,SAAS,CAAA;iBACjB;gBAED,6BAA6B;gBAC7B,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;aAC9B;YAED,OAAO,KAAK,CAAA;QACd,CAAC;KAAA;CACF;AAtMD,wCAsMC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-match-kind.d.ts b/node_modules/@actions/glob/lib/internal-match-kind.d.ts new file mode 100644 index 00000000..a7e60aaf --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-match-kind.d.ts @@ -0,0 +1,13 @@ +/** + * Indicates whether a pattern matches a path + */ +export declare enum MatchKind { + /** Not matched */ + None = 0, + /** Matched if the path is a directory */ + Directory = 1, + /** Matched if the path is a regular file */ + File = 2, + /** Matched */ + All = 3 +} diff --git a/node_modules/@actions/glob/lib/internal-match-kind.js b/node_modules/@actions/glob/lib/internal-match-kind.js new file mode 100644 index 00000000..827caf1e --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-match-kind.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Indicates whether a pattern matches a path + */ +var MatchKind; +(function (MatchKind) { + /** Not matched */ + MatchKind[MatchKind["None"] = 0] = "None"; + /** Matched if the path is a directory */ + MatchKind[MatchKind["Directory"] = 1] = "Directory"; + /** Matched if the path is a regular file */ + MatchKind[MatchKind["File"] = 2] = "File"; + /** Matched */ + MatchKind[MatchKind["All"] = 3] = "All"; +})(MatchKind = exports.MatchKind || (exports.MatchKind = {})); +//# sourceMappingURL=internal-match-kind.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-match-kind.js.map b/node_modules/@actions/glob/lib/internal-match-kind.js.map new file mode 100644 index 00000000..b0eec643 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-match-kind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-match-kind.js","sourceRoot":"","sources":["../src/internal-match-kind.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,kBAAkB;IAClB,yCAAQ,CAAA;IAER,yCAAyC;IACzC,mDAAa,CAAA;IAEb,4CAA4C;IAC5C,yCAAQ,CAAA;IAER,cAAc;IACd,uCAAsB,CAAA;AACxB,CAAC,EAZW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAYpB"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-path-helper.d.ts b/node_modules/@actions/glob/lib/internal-path-helper.d.ts new file mode 100644 index 00000000..0375c36c --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path-helper.d.ts @@ -0,0 +1,42 @@ +/** + * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths. + * + * For example, on Linux/macOS: + * - `/ => /` + * - `/hello => /` + * + * For example, on Windows: + * - `C:\ => C:\` + * - `C:\hello => C:\` + * - `C: => C:` + * - `C:hello => C:` + * - `\ => \` + * - `\hello => \` + * - `\\hello => \\hello` + * - `\\hello\world => \\hello\world` + */ +export declare function dirname(p: string): string; +/** + * Roots the path if not already rooted. On Windows, relative roots like `\` + * or `C:` are expanded based on the current working directory. + */ +export declare function ensureAbsoluteRoot(root: string, itemPath: string): string; +/** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\\hello\share` and `C:\hello` (and using alternate separator). + */ +export declare function hasAbsoluteRoot(itemPath: string): boolean; +/** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). + */ +export declare function hasRoot(itemPath: string): boolean; +/** + * Removes redundant slashes and converts `/` to `\` on Windows + */ +export declare function normalizeSeparators(p: string): string; +/** + * Normalizes the path separators and trims the trailing separator (when safe). + * For example, `/foo/ => /foo` but `/ => /` + */ +export declare function safeTrimTrailingSeparator(p: string): string; diff --git a/node_modules/@actions/glob/lib/internal-path-helper.js b/node_modules/@actions/glob/lib/internal-path-helper.js new file mode 100644 index 00000000..c5674b68 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path-helper.js @@ -0,0 +1,175 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const assert = require("assert"); +const path = require("path"); +const IS_WINDOWS = process.platform === 'win32'; +/** + * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths. + * + * For example, on Linux/macOS: + * - `/ => /` + * - `/hello => /` + * + * For example, on Windows: + * - `C:\ => C:\` + * - `C:\hello => C:\` + * - `C: => C:` + * - `C:hello => C:` + * - `\ => \` + * - `\hello => \` + * - `\\hello => \\hello` + * - `\\hello\world => \\hello\world` + */ +function dirname(p) { + // Normalize slashes and trim unnecessary trailing slash + p = safeTrimTrailingSeparator(p); + // Windows UNC root, e.g. \\hello or \\hello\world + if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { + return p; + } + // Get dirname + let result = path.dirname(p); + // Trim trailing slash for Windows UNC root, e.g. \\hello\world\ + if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { + result = safeTrimTrailingSeparator(result); + } + return result; +} +exports.dirname = dirname; +/** + * Roots the path if not already rooted. On Windows, relative roots like `\` + * or `C:` are expanded based on the current working directory. + */ +function ensureAbsoluteRoot(root, itemPath) { + assert(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + assert(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + // Already rooted + if (hasAbsoluteRoot(itemPath)) { + return itemPath; + } + // Windows + if (IS_WINDOWS) { + // Check for itemPath like C: or C:foo + if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { + let cwd = process.cwd(); + assert(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + // Drive letter matches cwd? Expand to cwd + if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { + // Drive only, e.g. C: + if (itemPath.length === 2) { + // Preserve specified drive letter case (upper or lower) + return `${itemPath[0]}:\\${cwd.substr(3)}`; + } + // Drive + path, e.g. C:foo + else { + if (!cwd.endsWith('\\')) { + cwd += '\\'; + } + // Preserve specified drive letter case (upper or lower) + return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; + } + } + // Different drive + else { + return `${itemPath[0]}:\\${itemPath.substr(2)}`; + } + } + // Check for itemPath like \ or \foo + else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { + const cwd = process.cwd(); + assert(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + return `${cwd[0]}:\\${itemPath.substr(1)}`; + } + } + assert(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + // Otherwise ensure root ends with a separator + if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) { + // Intentionally empty + } + else { + // Append separator + root += path.sep; + } + return root + itemPath; +} +exports.ensureAbsoluteRoot = ensureAbsoluteRoot; +/** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\\hello\share` and `C:\hello` (and using alternate separator). + */ +function hasAbsoluteRoot(itemPath) { + assert(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + // Normalize separators + itemPath = normalizeSeparators(itemPath); + // Windows + if (IS_WINDOWS) { + // E.g. \\hello\share or C:\hello + return itemPath.startsWith('\\\\') || /^[A-Z]:\\/i.test(itemPath); + } + // E.g. /hello + return itemPath.startsWith('/'); +} +exports.hasAbsoluteRoot = hasAbsoluteRoot; +/** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). + */ +function hasRoot(itemPath) { + assert(itemPath, `isRooted parameter 'itemPath' must not be empty`); + // Normalize separators + itemPath = normalizeSeparators(itemPath); + // Windows + if (IS_WINDOWS) { + // E.g. \ or \hello or \\hello + // E.g. C: or C:\hello + return itemPath.startsWith('\\') || /^[A-Z]:/i.test(itemPath); + } + // E.g. /hello + return itemPath.startsWith('/'); +} +exports.hasRoot = hasRoot; +/** + * Removes redundant slashes and converts `/` to `\` on Windows + */ +function normalizeSeparators(p) { + p = p || ''; + // Windows + if (IS_WINDOWS) { + // Convert slashes on Windows + p = p.replace(/\//g, '\\'); + // Remove redundant slashes + const isUnc = /^\\\\+[^\\]/.test(p); // e.g. \\hello + return (isUnc ? '\\' : '') + p.replace(/\\\\+/g, '\\'); // preserve leading \\ for UNC + } + // Remove redundant slashes + return p.replace(/\/\/+/g, '/'); +} +exports.normalizeSeparators = normalizeSeparators; +/** + * Normalizes the path separators and trims the trailing separator (when safe). + * For example, `/foo/ => /foo` but `/ => /` + */ +function safeTrimTrailingSeparator(p) { + // Short-circuit if empty + if (!p) { + return ''; + } + // Normalize separators + p = normalizeSeparators(p); + // No trailing slash + if (!p.endsWith(path.sep)) { + return p; + } + // Check '/' on Linux/macOS and '\' on Windows + if (p === path.sep) { + return p; + } + // On Windows check if drive root. E.g. C:\ + if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { + return p; + } + // Otherwise trim trailing slash + return p.substr(0, p.length - 1); +} +exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; +//# sourceMappingURL=internal-path-helper.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-path-helper.js.map b/node_modules/@actions/glob/lib/internal-path-helper.js.map new file mode 100644 index 00000000..1a70c0d6 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path-helper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-path-helper.js","sourceRoot":"","sources":["../src/internal-path-helper.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,6BAA4B;AAE5B,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,OAAO,CAAC,CAAS;IAC/B,wDAAwD;IACxD,CAAC,GAAG,yBAAyB,CAAC,CAAC,CAAC,CAAA;IAEhC,kDAAkD;IAClD,IAAI,UAAU,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QACnD,OAAO,CAAC,CAAA;KACT;IAED,cAAc;IACd,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAE5B,gEAAgE;IAChE,IAAI,UAAU,IAAI,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QACvD,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAA;KAC3C;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAlBD,0BAkBC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,IAAY,EAAE,QAAgB;IAC/D,MAAM,CAAC,IAAI,EAAE,uDAAuD,CAAC,CAAA;IACrE,MAAM,CAAC,QAAQ,EAAE,2DAA2D,CAAC,CAAA;IAE7E,iBAAiB;IACjB,IAAI,eAAe,CAAC,QAAQ,CAAC,EAAE;QAC7B,OAAO,QAAQ,CAAA;KAChB;IAED,UAAU;IACV,IAAI,UAAU,EAAE;QACd,sCAAsC;QACtC,IAAI,QAAQ,CAAC,KAAK,CAAC,yBAAyB,CAAC,EAAE;YAC7C,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;YACvB,MAAM,CACJ,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,EACvB,4EAA4E,GAAG,GAAG,CACnF,CAAA;YAED,0CAA0C;YAC1C,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE;gBACtD,sBAAsB;gBACtB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;oBACzB,wDAAwD;oBACxD,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;iBAC3C;gBACD,2BAA2B;qBACtB;oBACH,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;wBACvB,GAAG,IAAI,IAAI,CAAA;qBACZ;oBACD,wDAAwD;oBACxD,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;iBAChE;aACF;YACD,kBAAkB;iBACb;gBACH,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;aAChD;SACF;QACD,oCAAoC;aAC/B,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE;YAC7D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;YACzB,MAAM,CACJ,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,EACvB,4EAA4E,GAAG,GAAG,CACnF,CAAA;YAED,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;SAC3C;KACF;IAED,MAAM,CACJ,eAAe,CAAC,IAAI,CAAC,EACrB,gEAAgE,CACjE,CAAA;IAED,8CAA8C;IAC9C,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE;QAC7D,sBAAsB;KACvB;SAAM;QACL,mBAAmB;QACnB,IAAI,IAAI,IAAI,CAAC,GAAG,CAAA;KACjB;IAED,OAAO,IAAI,GAAG,QAAQ,CAAA;AACxB,CAAC;AAlED,gDAkEC;AAED;;;GAGG;AACH,SAAgB,eAAe,CAAC,QAAgB;IAC9C,MAAM,CAAC,QAAQ,EAAE,wDAAwD,CAAC,CAAA;IAE1E,uBAAuB;IACvB,QAAQ,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAA;IAExC,UAAU;IACV,IAAI,UAAU,EAAE;QACd,iCAAiC;QACjC,OAAO,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;KAClE;IAED,cAAc;IACd,OAAO,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;AACjC,CAAC;AAdD,0CAcC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,QAAgB;IACtC,MAAM,CAAC,QAAQ,EAAE,iDAAiD,CAAC,CAAA;IAEnE,uBAAuB;IACvB,QAAQ,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAA;IAExC,UAAU;IACV,IAAI,UAAU,EAAE;QACd,8BAA8B;QAC9B,sBAAsB;QACtB,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;KAC9D;IAED,cAAc;IACd,OAAO,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;AACjC,CAAC;AAfD,0BAeC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CAAC,CAAS;IAC3C,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;IAEX,UAAU;IACV,IAAI,UAAU,EAAE;QACd,6BAA6B;QAC7B,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QAE1B,2BAA2B;QAC3B,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA,CAAC,eAAe;QACnD,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA,CAAC,8BAA8B;KACtF;IAED,2BAA2B;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AACjC,CAAC;AAfD,kDAeC;AAED;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,CAAS;IACjD,yBAAyB;IACzB,IAAI,CAAC,CAAC,EAAE;QACN,OAAO,EAAE,CAAA;KACV;IAED,uBAAuB;IACvB,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAA;IAE1B,oBAAoB;IACpB,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACzB,OAAO,CAAC,CAAA;KACT;IAED,8CAA8C;IAC9C,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE;QAClB,OAAO,CAAC,CAAA;KACT;IAED,2CAA2C;IAC3C,IAAI,UAAU,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QACvC,OAAO,CAAC,CAAA;KACT;IAED,gCAAgC;IAChC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAClC,CAAC;AA1BD,8DA0BC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-path.d.ts b/node_modules/@actions/glob/lib/internal-path.d.ts new file mode 100644 index 00000000..5e0a2641 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path.d.ts @@ -0,0 +1,15 @@ +/** + * Helper class for parsing paths into segments + */ +export declare class Path { + segments: string[]; + /** + * Constructs a Path + * @param itemPath Path or array of segments + */ + constructor(itemPath: string | string[]); + /** + * Converts the path to it's string representation + */ + toString(): string; +} diff --git a/node_modules/@actions/glob/lib/internal-path.js b/node_modules/@actions/glob/lib/internal-path.js new file mode 100644 index 00000000..0acfc139 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path.js @@ -0,0 +1,90 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const assert = require("assert"); +const path = require("path"); +const pathHelper = require("./internal-path-helper"); +const IS_WINDOWS = process.platform === 'win32'; +/** + * Helper class for parsing paths into segments + */ +class Path { + /** + * Constructs a Path + * @param itemPath Path or array of segments + */ + constructor(itemPath) { + this.segments = []; + // String + if (typeof itemPath === 'string') { + assert(itemPath, `Parameter 'itemPath' must not be empty`); + // Normalize slashes and trim unnecessary trailing slash + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + // Not rooted + if (!pathHelper.hasRoot(itemPath)) { + this.segments = itemPath.split(path.sep); + } + // Rooted + else { + // Add all segments, while not at the root + let remaining = itemPath; + let dir = pathHelper.dirname(remaining); + while (dir !== remaining) { + // Add the segment + const basename = path.basename(remaining); + this.segments.unshift(basename); + // Truncate the last segment + remaining = dir; + dir = pathHelper.dirname(remaining); + } + // Remainder is the root + this.segments.unshift(remaining); + } + } + // Array + else { + // Must not be empty + assert(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + // Each segment + for (let i = 0; i < itemPath.length; i++) { + let segment = itemPath[i]; + // Must not be empty + assert(segment, `Parameter 'itemPath' must not contain any empty segments`); + // Normalize slashes + segment = pathHelper.normalizeSeparators(itemPath[i]); + // Root segment + if (i === 0 && pathHelper.hasRoot(segment)) { + segment = pathHelper.safeTrimTrailingSeparator(segment); + assert(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + this.segments.push(segment); + } + // All other segments + else { + // Must not contain slash + assert(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); + this.segments.push(segment); + } + } + } + } + /** + * Converts the path to it's string representation + */ + toString() { + // First segment + let result = this.segments[0]; + // All others + let skipSlash = result.endsWith(path.sep) || (IS_WINDOWS && /^[A-Z]:$/i.test(result)); + for (let i = 1; i < this.segments.length; i++) { + if (skipSlash) { + skipSlash = false; + } + else { + result += path.sep; + } + result += this.segments[i]; + } + return result; + } +} +exports.Path = Path; +//# sourceMappingURL=internal-path.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-path.js.map b/node_modules/@actions/glob/lib/internal-path.js.map new file mode 100644 index 00000000..9095a6d2 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-path.js","sourceRoot":"","sources":["../src/internal-path.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,6BAA4B;AAC5B,qDAAoD;AAEpD,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C;;GAEG;AACH,MAAa,IAAI;IAGf;;;OAGG;IACH,YAAY,QAA2B;QANvC,aAAQ,GAAa,EAAE,CAAA;QAOrB,SAAS;QACT,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAChC,MAAM,CAAC,QAAQ,EAAE,wCAAwC,CAAC,CAAA;YAE1D,wDAAwD;YACxD,QAAQ,GAAG,UAAU,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAA;YAEzD,aAAa;YACb,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;aACzC;YACD,SAAS;iBACJ;gBACH,0CAA0C;gBAC1C,IAAI,SAAS,GAAG,QAAQ,CAAA;gBACxB,IAAI,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;gBACvC,OAAO,GAAG,KAAK,SAAS,EAAE;oBACxB,kBAAkB;oBAClB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;oBACzC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;oBAE/B,4BAA4B;oBAC5B,SAAS,GAAG,GAAG,CAAA;oBACf,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;iBACpC;gBAED,wBAAwB;gBACxB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;aACjC;SACF;QACD,QAAQ;aACH;YACH,oBAAoB;YACpB,MAAM,CACJ,QAAQ,CAAC,MAAM,GAAG,CAAC,EACnB,iDAAiD,CAClD,CAAA;YAED,eAAe;YACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACxC,IAAI,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;gBAEzB,oBAAoB;gBACpB,MAAM,CACJ,OAAO,EACP,0DAA0D,CAC3D,CAAA;gBAED,oBAAoB;gBACpB,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;gBAErD,eAAe;gBACf,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;oBAC1C,OAAO,GAAG,UAAU,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAA;oBACvD,MAAM,CACJ,OAAO,KAAK,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,EACvC,8EAA8E,CAC/E,CAAA;oBACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;iBAC5B;gBACD,qBAAqB;qBAChB;oBACH,yBAAyB;oBACzB,MAAM,CACJ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAC3B,0DAA0D,CAC3D,CAAA;oBACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;iBAC5B;aACF;SACF;IACH,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,gBAAgB;QAChB,IAAI,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QAE7B,aAAa;QACb,IAAI,SAAS,GACX,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;QACvE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,IAAI,SAAS,EAAE;gBACb,SAAS,GAAG,KAAK,CAAA;aAClB;iBAAM;gBACL,MAAM,IAAI,IAAI,CAAC,GAAG,CAAA;aACnB;YAED,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;SAC3B;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAvGD,oBAuGC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-pattern-helper.d.ts b/node_modules/@actions/glob/lib/internal-pattern-helper.d.ts new file mode 100644 index 00000000..c5dcc072 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern-helper.d.ts @@ -0,0 +1,15 @@ +import { MatchKind } from './internal-match-kind'; +import { Pattern } from './internal-pattern'; +/** + * Given an array of patterns, returns an array of paths to search. + * Duplicates and paths under other included paths are filtered out. + */ +export declare function getSearchPaths(patterns: Pattern[]): string[]; +/** + * Matches the patterns against the path + */ +export declare function match(patterns: Pattern[], itemPath: string): MatchKind; +/** + * Checks whether to descend further into the directory + */ +export declare function partialMatch(patterns: Pattern[], itemPath: string): boolean; diff --git a/node_modules/@actions/glob/lib/internal-pattern-helper.js b/node_modules/@actions/glob/lib/internal-pattern-helper.js new file mode 100644 index 00000000..85ecea88 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern-helper.js @@ -0,0 +1,74 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const pathHelper = require("./internal-path-helper"); +const internal_match_kind_1 = require("./internal-match-kind"); +const IS_WINDOWS = process.platform === 'win32'; +/** + * Given an array of patterns, returns an array of paths to search. + * Duplicates and paths under other included paths are filtered out. + */ +function getSearchPaths(patterns) { + // Ignore negate patterns + patterns = patterns.filter(x => !x.negate); + // Create a map of all search paths + const searchPathMap = {}; + for (const pattern of patterns) { + const key = IS_WINDOWS + ? pattern.searchPath.toUpperCase() + : pattern.searchPath; + searchPathMap[key] = 'candidate'; + } + const result = []; + for (const pattern of patterns) { + // Check if already included + const key = IS_WINDOWS + ? pattern.searchPath.toUpperCase() + : pattern.searchPath; + if (searchPathMap[key] === 'included') { + continue; + } + // Check for an ancestor search path + let foundAncestor = false; + let tempKey = key; + let parent = pathHelper.dirname(tempKey); + while (parent !== tempKey) { + if (searchPathMap[parent]) { + foundAncestor = true; + break; + } + tempKey = parent; + parent = pathHelper.dirname(tempKey); + } + // Include the search pattern in the result + if (!foundAncestor) { + result.push(pattern.searchPath); + searchPathMap[key] = 'included'; + } + } + return result; +} +exports.getSearchPaths = getSearchPaths; +/** + * Matches the patterns against the path + */ +function match(patterns, itemPath) { + let result = internal_match_kind_1.MatchKind.None; + for (const pattern of patterns) { + if (pattern.negate) { + result &= ~pattern.match(itemPath); + } + else { + result |= pattern.match(itemPath); + } + } + return result; +} +exports.match = match; +/** + * Checks whether to descend further into the directory + */ +function partialMatch(patterns, itemPath) { + return patterns.some(x => !x.negate && x.partialMatch(itemPath)); +} +exports.partialMatch = partialMatch; +//# sourceMappingURL=internal-pattern-helper.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-pattern-helper.js.map b/node_modules/@actions/glob/lib/internal-pattern-helper.js.map new file mode 100644 index 00000000..7fbfa400 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern-helper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-pattern-helper.js","sourceRoot":"","sources":["../src/internal-pattern-helper.ts"],"names":[],"mappings":";;AAAA,qDAAoD;AACpD,+DAA+C;AAG/C,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C;;;GAGG;AACH,SAAgB,cAAc,CAAC,QAAmB;IAChD,yBAAyB;IACzB,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IAE1C,mCAAmC;IACnC,MAAM,aAAa,GAA4B,EAAE,CAAA;IACjD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,MAAM,GAAG,GAAG,UAAU;YACpB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE;YAClC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAA;QACtB,aAAa,CAAC,GAAG,CAAC,GAAG,WAAW,CAAA;KACjC;IAED,MAAM,MAAM,GAAa,EAAE,CAAA;IAE3B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,4BAA4B;QAC5B,MAAM,GAAG,GAAG,UAAU;YACpB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE;YAClC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAA;QACtB,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,UAAU,EAAE;YACrC,SAAQ;SACT;QAED,oCAAoC;QACpC,IAAI,aAAa,GAAG,KAAK,CAAA;QACzB,IAAI,OAAO,GAAG,GAAG,CAAA;QACjB,IAAI,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACxC,OAAO,MAAM,KAAK,OAAO,EAAE;YACzB,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE;gBACzB,aAAa,GAAG,IAAI,CAAA;gBACpB,MAAK;aACN;YAED,OAAO,GAAG,MAAM,CAAA;YAChB,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;SACrC;QAED,2CAA2C;QAC3C,IAAI,CAAC,aAAa,EAAE;YAClB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;YAC/B,aAAa,CAAC,GAAG,CAAC,GAAG,UAAU,CAAA;SAChC;KACF;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AA9CD,wCA8CC;AAED;;GAEG;AACH,SAAgB,KAAK,CAAC,QAAmB,EAAE,QAAgB;IACzD,IAAI,MAAM,GAAc,+BAAS,CAAC,IAAI,CAAA;IAEtC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;SACnC;aAAM;YACL,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;SAClC;KACF;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAZD,sBAYC;AAED;;GAEG;AACH,SAAgB,YAAY,CAAC,QAAmB,EAAE,QAAgB;IAChE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAA;AAClE,CAAC;AAFD,oCAEC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-pattern.d.ts b/node_modules/@actions/glob/lib/internal-pattern.d.ts new file mode 100644 index 00000000..7b2a96a6 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern.d.ts @@ -0,0 +1,59 @@ +import { MatchKind } from './internal-match-kind'; +export declare class Pattern { + /** + * Indicates whether matches should be excluded from the result set + */ + readonly negate: boolean; + /** + * The directory to search. The literal path prior to the first glob segment. + */ + readonly searchPath: string; + /** + * The path/pattern segments. Note, only the first segment (the root directory) + * may contain a directory separator charactor. Use the trailingSeparator field + * to determine whether the pattern ended with a trailing slash. + */ + readonly segments: string[]; + /** + * Indicates the pattern should only match directories, not regular files. + */ + readonly trailingSeparator: boolean; + /** + * The Minimatch object used for matching + */ + private readonly minimatch; + /** + * Used to workaround a limitation with Minimatch when determining a partial + * match and the path is a root directory. For example, when the pattern is + * `/foo/**` or `C:\foo\**` and the path is `/` or `C:\`. + */ + private readonly rootRegExp; + constructor(pattern: string); + constructor(negate: boolean, segments: string[]); + /** + * Matches the pattern against the specified path + */ + match(itemPath: string): MatchKind; + /** + * Indicates whether the pattern may match descendants of the specified path + */ + partialMatch(itemPath: string): boolean; + /** + * Escapes glob patterns within a path + */ + static globEscape(s: string): string; + /** + * Normalizes slashes and ensures absolute root + */ + private static fixupPattern; + /** + * Attempts to unescape a pattern segment to create a literal path segment. + * Otherwise returns empty string. + */ + private static getLiteral; + /** + * Escapes regexp special characters + * https://javascript.info/regexp-escaping + */ + private static regExpEscape; +} diff --git a/node_modules/@actions/glob/lib/internal-pattern.js b/node_modules/@actions/glob/lib/internal-pattern.js new file mode 100644 index 00000000..f673293f --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern.js @@ -0,0 +1,231 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const assert = require("assert"); +const os = require("os"); +const path = require("path"); +const pathHelper = require("./internal-path-helper"); +const minimatch_1 = require("minimatch"); +const internal_match_kind_1 = require("./internal-match-kind"); +const internal_path_1 = require("./internal-path"); +const IS_WINDOWS = process.platform === 'win32'; +class Pattern { + constructor(patternOrNegate, segments) { + /** + * Indicates whether matches should be excluded from the result set + */ + this.negate = false; + // Pattern overload + let pattern; + if (typeof patternOrNegate === 'string') { + pattern = patternOrNegate.trim(); + } + // Segments overload + else { + // Convert to pattern + segments = segments || []; + assert(segments.length, `Parameter 'segments' must not empty`); + const root = Pattern.getLiteral(segments[0]); + assert(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + pattern = new internal_path_1.Path(segments).toString().trim(); + if (patternOrNegate) { + pattern = `!${pattern}`; + } + } + // Negate + while (pattern.startsWith('!')) { + this.negate = !this.negate; + pattern = pattern.substr(1).trim(); + } + // Normalize slashes and ensures absolute root + pattern = Pattern.fixupPattern(pattern); + // Segments + this.segments = new internal_path_1.Path(pattern).segments; + // Trailing slash indicates the pattern should only match directories, not regular files + this.trailingSeparator = pathHelper + .normalizeSeparators(pattern) + .endsWith(path.sep); + pattern = pathHelper.safeTrimTrailingSeparator(pattern); + // Search path (literal path prior to the first glob segment) + let foundGlob = false; + const searchSegments = this.segments + .map(x => Pattern.getLiteral(x)) + .filter(x => !foundGlob && !(foundGlob = x === '')); + this.searchPath = new internal_path_1.Path(searchSegments).toString(); + // Root RegExp (required when determining partial match) + this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? 'i' : ''); + // Create minimatch + const minimatchOptions = { + dot: true, + nobrace: true, + nocase: IS_WINDOWS, + nocomment: true, + noext: true, + nonegate: true + }; + pattern = IS_WINDOWS ? pattern.replace(/\\/g, '/') : pattern; + this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); + } + /** + * Matches the pattern against the specified path + */ + match(itemPath) { + // Last segment is globstar? + if (this.segments[this.segments.length - 1] === '**') { + // Normalize slashes + itemPath = pathHelper.normalizeSeparators(itemPath); + // Append a trailing slash. Otherwise Minimatch will not match the directory immediately + // preceeding the globstar. For example, given the pattern `/foo/**`, Minimatch returns + // false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk. + if (!itemPath.endsWith(path.sep)) { + // Note, this is safe because the constructor ensures the pattern has an absolute root. + // For example, formats like C: and C:foo on Windows are resolved to an aboslute root. + itemPath = `${itemPath}${path.sep}`; + } + } + else { + // Normalize slashes and trim unnecessary trailing slash + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + } + // Match + if (this.minimatch.match(itemPath)) { + return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; + } + return internal_match_kind_1.MatchKind.None; + } + /** + * Indicates whether the pattern may match descendants of the specified path + */ + partialMatch(itemPath) { + // Normalize slashes and trim unnecessary trailing slash + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + // matchOne does not handle root path correctly + if (pathHelper.dirname(itemPath) === itemPath) { + return this.rootRegExp.test(itemPath); + } + return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); + } + /** + * Escapes glob patterns within a path + */ + static globEscape(s) { + return (IS_WINDOWS ? s : s.replace(/\\/g, '\\\\')) // escape '\' on Linux/macOS + .replace(/(\[)(?=[^/]+\])/g, '[[]') // escape '[' when ']' follows within the path segment + .replace(/\?/g, '[?]') // escape '?' + .replace(/\*/g, '[*]'); // escape '*' + } + /** + * Normalizes slashes and ensures absolute root + */ + static fixupPattern(pattern) { + // Empty + assert(pattern, 'pattern cannot be empty'); + // Must not contain `.` segment, unless first segment + // Must not contain `..` segment + const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x)); + assert(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + // Must not contain globs in root, e.g. Windows UNC path \\foo\b*r + assert(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + // Normalize slashes + pattern = pathHelper.normalizeSeparators(pattern); + // Replace leading `.` segment + if (pattern === '.' || pattern.startsWith(`.${path.sep}`)) { + pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1); + } + // Replace leading `~` segment + else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) { + const homedir = os.homedir(); + assert(homedir, 'Unable to determine HOME directory'); + assert(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + pattern = Pattern.globEscape(homedir) + pattern.substr(1); + } + // Replace relative drive root, e.g. pattern is C: or C:foo + else if (IS_WINDOWS && + (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { + let root = pathHelper.ensureAbsoluteRoot('C:\\dummy-root', pattern.substr(0, 2)); + if (pattern.length > 2 && !root.endsWith('\\')) { + root += '\\'; + } + pattern = Pattern.globEscape(root) + pattern.substr(2); + } + // Replace relative root, e.g. pattern is \ or \foo + else if (IS_WINDOWS && (pattern === '\\' || pattern.match(/^\\[^\\]/))) { + let root = pathHelper.ensureAbsoluteRoot('C:\\dummy-root', '\\'); + if (!root.endsWith('\\')) { + root += '\\'; + } + pattern = Pattern.globEscape(root) + pattern.substr(1); + } + // Otherwise ensure absolute root + else { + pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern); + } + return pathHelper.normalizeSeparators(pattern); + } + /** + * Attempts to unescape a pattern segment to create a literal path segment. + * Otherwise returns empty string. + */ + static getLiteral(segment) { + let literal = ''; + for (let i = 0; i < segment.length; i++) { + const c = segment[i]; + // Escape + if (c === '\\' && !IS_WINDOWS && i + 1 < segment.length) { + literal += segment[++i]; + continue; + } + // Wildcard + else if (c === '*' || c === '?') { + return ''; + } + // Character set + else if (c === '[' && i + 1 < segment.length) { + let set = ''; + let closed = -1; + for (let i2 = i + 1; i2 < segment.length; i2++) { + const c2 = segment[i2]; + // Escape + if (c2 === '\\' && !IS_WINDOWS && i2 + 1 < segment.length) { + set += segment[++i2]; + continue; + } + // Closed + else if (c2 === ']') { + closed = i2; + break; + } + // Otherwise + else { + set += c2; + } + } + // Closed? + if (closed >= 0) { + // Cannot convert + if (set.length > 1) { + return ''; + } + // Convert to literal + if (set) { + literal += set; + i = closed; + continue; + } + } + // Otherwise fall thru + } + // Append + literal += c; + } + return literal; + } + /** + * Escapes regexp special characters + * https://javascript.info/regexp-escaping + */ + static regExpEscape(s) { + return s.replace(/[[\\^$.|?*+()]/g, '\\$&'); + } +} +exports.Pattern = Pattern; +//# sourceMappingURL=internal-pattern.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-pattern.js.map b/node_modules/@actions/glob/lib/internal-pattern.js.map new file mode 100644 index 00000000..9ef52077 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-pattern.js","sourceRoot":"","sources":["../src/internal-pattern.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,yBAAwB;AACxB,6BAA4B;AAC5B,qDAAoD;AACpD,yCAA8E;AAC9E,+DAA+C;AAC/C,mDAAoC;AAEpC,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C,MAAa,OAAO;IAyClB,YAAY,eAAiC,EAAE,QAAmB;QAxClE;;WAEG;QACM,WAAM,GAAY,KAAK,CAAA;QAsC9B,mBAAmB;QACnB,IAAI,OAAe,CAAA;QACnB,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE;YACvC,OAAO,GAAG,eAAe,CAAC,IAAI,EAAE,CAAA;SACjC;QACD,oBAAoB;aACf;YACH,qBAAqB;YACrB,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAA;YACzB,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,qCAAqC,CAAC,CAAA;YAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YAC5C,MAAM,CACJ,IAAI,IAAI,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,EACxC,wDAAwD,CACzD,CAAA;YACD,OAAO,GAAG,IAAI,oBAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAA;YAC9C,IAAI,eAAe,EAAE;gBACnB,OAAO,GAAG,IAAI,OAAO,EAAE,CAAA;aACxB;SACF;QAED,SAAS;QACT,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YAC9B,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAA;YAC1B,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;SACnC;QAED,8CAA8C;QAC9C,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;QAEvC,WAAW;QACX,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAA;QAE1C,wFAAwF;QACxF,IAAI,CAAC,iBAAiB,GAAG,UAAU;aAChC,mBAAmB,CAAC,OAAO,CAAC;aAC5B,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACrB,OAAO,GAAG,UAAU,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAA;QAEvD,6DAA6D;QAC7D,IAAI,SAAS,GAAG,KAAK,CAAA;QACrB,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ;aACjC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;aAC/B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACrD,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE,CAAA;QAErD,wDAAwD;QACxD,IAAI,CAAC,UAAU,GAAG,IAAI,MAAM,CAC1B,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EACvC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CACtB,CAAA;QAED,mBAAmB;QACnB,MAAM,gBAAgB,GAAsB;YAC1C,GAAG,EAAE,IAAI;YACT,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;SACf,CAAA;QACD,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;QAC5D,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAS,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAA;IAC3D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAgB;QACpB,4BAA4B;QAC5B,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;YACpD,oBAAoB;YACpB,QAAQ,GAAG,UAAU,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAA;YAEnD,wFAAwF;YACxF,uFAAuF;YACvF,+FAA+F;YAC/F,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBAChC,uFAAuF;gBACvF,sFAAsF;gBACtF,QAAQ,GAAG,GAAG,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;aACpC;SACF;aAAM;YACL,wDAAwD;YACxD,QAAQ,GAAG,UAAU,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAA;SAC1D;QAED,QAAQ;QACR,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YAClC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,+BAAS,CAAC,SAAS,CAAC,CAAC,CAAC,+BAAS,CAAC,GAAG,CAAA;SACpE;QAED,OAAO,+BAAS,CAAC,IAAI,CAAA;IACvB,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,QAAgB;QAC3B,wDAAwD;QACxD,QAAQ,GAAG,UAAU,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAA;QAEzD,+CAA+C;QAC/C,IAAI,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE;YAC7C,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;SACtC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAC5B,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EACrB,IAAI,CACL,CAAA;IACH,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,CAAS;QACzB,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,4BAA4B;aAC5E,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC,sDAAsD;aACzF,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,aAAa;aACnC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA,CAAC,aAAa;IACxC,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,YAAY,CAAC,OAAe;QACzC,QAAQ;QACR,MAAM,CAAC,OAAO,EAAE,yBAAyB,CAAC,CAAA;QAE1C,qDAAqD;QACrD,gCAAgC;QAChC,MAAM,eAAe,GAAG,IAAI,oBAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CACzD,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CACtB,CAAA;QACD,MAAM,CACJ,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,EACrE,oBAAoB,OAAO,kDAAkD,CAC9E,CAAA;QAED,kEAAkE;QAClE,MAAM,CACJ,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,EAClD,oBAAoB,OAAO,yCAAyC,CACrE,CAAA;QAED,oBAAoB;QACpB,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAA;QAEjD,8BAA8B;QAC9B,IAAI,OAAO,KAAK,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE;YACzD,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;SAChE;QACD,8BAA8B;aACzB,IAAI,OAAO,KAAK,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE;YAC9D,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,CAAA;YAC5B,MAAM,CAAC,OAAO,EAAE,oCAAoC,CAAC,CAAA;YACrD,MAAM,CACJ,UAAU,CAAC,eAAe,CAAC,OAAO,CAAC,EACnC,wDAAwD,OAAO,GAAG,CACnE,CAAA;YACD,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;SAC1D;QACD,2DAA2D;aACtD,IACH,UAAU;YACV,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,EAC9D;YACA,IAAI,IAAI,GAAG,UAAU,CAAC,kBAAkB,CACtC,gBAAgB,EAChB,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CACrB,CAAA;YACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAC9C,IAAI,IAAI,IAAI,CAAA;aACb;YACD,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;SACvD;QACD,mDAAmD;aAC9C,IAAI,UAAU,IAAI,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE;YACtE,IAAI,IAAI,GAAG,UAAU,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAA;YAChE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBACxB,IAAI,IAAI,IAAI,CAAA;aACb;YACD,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;SACvD;QACD,iCAAiC;aAC5B;YACH,OAAO,GAAG,UAAU,CAAC,kBAAkB,CACrC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EACjC,OAAO,CACR,CAAA;SACF;QAED,OAAO,UAAU,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAA;IAChD,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,UAAU,CAAC,OAAe;QACvC,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;YACpB,SAAS;YACT,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACvD,OAAO,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;gBACvB,SAAQ;aACT;YACD,WAAW;iBACN,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE;gBAC/B,OAAO,EAAE,CAAA;aACV;YACD,gBAAgB;iBACX,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBAC5C,IAAI,GAAG,GAAG,EAAE,CAAA;gBACZ,IAAI,MAAM,GAAG,CAAC,CAAC,CAAA;gBACf,KAAK,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;oBAC9C,MAAM,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAAA;oBACtB,SAAS;oBACT,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC,UAAU,IAAI,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;wBACzD,GAAG,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAA;wBACpB,SAAQ;qBACT;oBACD,SAAS;yBACJ,IAAI,EAAE,KAAK,GAAG,EAAE;wBACnB,MAAM,GAAG,EAAE,CAAA;wBACX,MAAK;qBACN;oBACD,YAAY;yBACP;wBACH,GAAG,IAAI,EAAE,CAAA;qBACV;iBACF;gBAED,UAAU;gBACV,IAAI,MAAM,IAAI,CAAC,EAAE;oBACf,iBAAiB;oBACjB,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;wBAClB,OAAO,EAAE,CAAA;qBACV;oBAED,qBAAqB;oBACrB,IAAI,GAAG,EAAE;wBACP,OAAO,IAAI,GAAG,CAAA;wBACd,CAAC,GAAG,MAAM,CAAA;wBACV,SAAQ;qBACT;iBACF;gBAED,sBAAsB;aACvB;YAED,SAAS;YACT,OAAO,IAAI,CAAC,CAAA;SACb;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,YAAY,CAAC,CAAS;QACnC,OAAO,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;IAC7C,CAAC;CACF;AAtTD,0BAsTC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-search-state.d.ts b/node_modules/@actions/glob/lib/internal-search-state.d.ts new file mode 100644 index 00000000..aac344eb --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-search-state.d.ts @@ -0,0 +1,5 @@ +export declare class SearchState { + readonly path: string; + readonly level: number; + constructor(path: string, level: number); +} diff --git a/node_modules/@actions/glob/lib/internal-search-state.js b/node_modules/@actions/glob/lib/internal-search-state.js new file mode 100644 index 00000000..e156f665 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-search-state.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class SearchState { + constructor(path, level) { + this.path = path; + this.level = level; + } +} +exports.SearchState = SearchState; +//# sourceMappingURL=internal-search-state.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-search-state.js.map b/node_modules/@actions/glob/lib/internal-search-state.js.map new file mode 100644 index 00000000..efd12016 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-search-state.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-search-state.js","sourceRoot":"","sources":["../src/internal-search-state.ts"],"names":[],"mappings":";;AAAA,MAAa,WAAW;IAItB,YAAY,IAAY,EAAE,KAAa;QACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;CACF;AARD,kCAQC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/package.json b/node_modules/@actions/glob/package.json new file mode 100644 index 00000000..943bd734 --- /dev/null +++ b/node_modules/@actions/glob/package.json @@ -0,0 +1,71 @@ +{ + "_args": [ + [ + "@actions/glob@0.1.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@actions/glob@0.1.0", + "_id": "@actions/glob@0.1.0", + "_inBundle": false, + "_integrity": "sha512-lx8SzyQ2FE9+UUvjqY1f28QbTJv+w8qP7kHHbfQRhphrlcx0Mdmm1tZdGJzfxv1jxREa/sLW4Oy8CbGQKCJySA==", + "_location": "/@actions/glob", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/glob@0.1.0", + "name": "@actions/glob", + "escapedName": "@actions%2fglob", + "scope": "@actions", + "rawSpec": "0.1.0", + "saveSpec": null, + "fetchSpec": "0.1.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.1.0.tgz", + "_spec": "0.1.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@actions/core": "^1.2.0", + "minimatch": "^3.0.4" + }, + "description": "Actions glob lib", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/actions/toolkit/tree/master/packages/glob", + "keywords": [ + "github", + "actions", + "glob" + ], + "license": "MIT", + "main": "lib/glob.js", + "name": "@actions/glob", + "preview": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/glob" + }, + "scripts": { + "audit-moderate": "npm install && npm audit --audit-level=moderate", + "test": "echo \"Error: run tests from root\" && exit 1", + "tsc": "tsc" + }, + "types": "lib/glob.d.ts", + "version": "0.1.0" +} diff --git a/node_modules/@actions/http-client/LICENSE b/node_modules/@actions/http-client/LICENSE new file mode 100644 index 00000000..5823a51c --- /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 00000000..9ef52c27 --- /dev/null +++ b/node_modules/@actions/http-client/README.md @@ -0,0 +1,73 @@ + +

+ +

+ +# Actions Http-Client + +[![Http Status](https://github.com/actions/http-client/workflows/http-tests/badge.svg)](https://github.com/actions/http-client/actions) + +A lightweight HTTP client optimized for use with actions, TypeScript with generics and async await. + +## Features + + - HTTP client with TypeScript generics and async/await/Promises + - Typings included so no need to acquire separately (great for intellisense and no versioning drift) + - [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 + +## Install + +``` +npm install @actions/http-client --save +``` + +## Samples + +See the [HTTP](./__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 [HTTP tests](./__tests__) for detailed examples. + +## Debugging + +To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible: + +``` +export NODE_DEBUG=http +``` + +## Node support + +The http-client is built using the latest LTS version of Node 12. We also support the latest LTS for Node 6, 8 and Node 10. + +## Contributing + +We welcome PRs. Please create an issue and if applicable, a design before proceeding with code. + +once: + +```bash +$ npm install +``` + +To build: + +```bash +$ npm run build +``` + +To run all tests: +```bash +$ npm test +``` diff --git a/node_modules/@actions/http-client/actions.png b/node_modules/@actions/http-client/actions.png new file mode 100644 index 0000000000000000000000000000000000000000..1857ef375592b5bbce3f2b225865d32428c13acb GIT binary patch literal 33889 zcmdSAWpo|Qt{`fRDQ0Hon3-{RMHd;v*6ILy$;QPLW6i;9yF`M$b-X%*4t`#KA?+ z#Lmjd!v2MbnURT$fsvDeiG_}liJOs~n~j6$UyTGv&B4TsTUk{6U$lUCd?eqTob0$6 z7+hUl>0Mdq0S@L2Ok7+*9Lx;N%yd8qI!AX~Cqp+nTSwA=V-PiUGqpm$->BgQ>Nt zjj64ZBM_G9Kd^S+08RkMZ-D;|>i=~APXvIXm6Q7qjsJEmHa7nu;pimh0%YS~0{L&D z9aY`!Oc|6-9Rbb`#-?H}z+sa9;l_?z#KF|i3E-d#09gNfq7?r>^ zQFH*9Sy%%*9F--6iKN6t*qON4+3A?+nf?w}PL5m3*3rq(*4R`^l#c``9(oH46K)PB zE@o3k7Bf0CP9sJ-RxV=>I!;bjLpoLyBMwt8BMv53HXxzDbH*(SFn0c<1pj{D&H2-K1x1@z5a9-X2WjrdT_W!!FwjlbeFx-a5e++?-#Q2W}n3|CM z>#@cEwFLe_>-x1p?x8CM7DQ>Xvbu>DsQVHXoAhy>gqn z>gjO-V?maH7Jj?#i42M?D)#mzCxD8^MN~)-DP~>fTP~Eaq_D@u-aXHQd^VTk z*#p~?@D6P5-#$zn4QM@GVC$S}5kA}ow(HF`j3C7vn>+O_4d)TbAk)uwf) z8;`w+c_-s`{uq~fjZSKU_(txjUVgLF*r5@ox2}yds~nRvKJyBai8*h+XH2)_>wTS z>l>Cf1-`Q0bUD!G6Sg1=Z<@HccOuqJ)EsrAraGJyemSn=tSgGU-n(ge*Qke?Lon^l z?f1>*6$Tmu5zz`T$xn#I@~f& z)pq!{S}#k>bKTr=N^hC(h);+CEkfc1iXaJ9q0Y#`1A*|Yu1<@p)7(Dd(r7v8b&;db zu$R>JYHJ~4F>}(7bbZ6G1k|A{pfV+U6N2{EUV5Od|Hk>Y#Q${^^64;TR=x9xurQK0 zu3rbGQIv=kNf|UT0AxS>S27VABpwn9p!2)Xnam!MLiW|{D#oal$#a2e-HeZ2dS;se z@`zkYY480XjfMtl^s;#@3L3g9KCgToH`{B56`>S-+msKMuhddBK6q)MI=vtm0uj|~ zNAa+{UxOgkS5+93PuEQTir%EnoqMmh7l8pBU*%fYcygXFQ#fzF)-sOev%*Hr5*l|Qyo3@&8%9t6QQm@_JH{{3oCP_Azu?;k zcAQh%v=Hv zhbCMA5+8oN%C?IdyQ5s%+dW`Cg(lNylrZhV(L{L8{y2;9Oay4)}%s;!3-7zJ-?i zQ6<)XIp58`w70Ia`zp(?I|{RNLM+eit)nk{^19n_n8oUlJVgpOa+^w42j^q?oGB-z4tGyF#M9r(w8^bq_8lF^DllFIQre4Y@tMkw? zkBWO$ZtWG}i&|sX`!(tYK+Z&&3MxZHdHzVPXu6I+DsyBzC{8nLs!R}rg6$oheC0i~ z+h4t)aHA)*nY^!fD6cc$6r*|^y;z4F8Xpbxr`qHCfE+`Q)t}kSBsPg~+orc$jo2Jl5r%Z*sut1@U940uk?wYH?73~ksYH4FLwAS)n)a7$OSL1yPaQje?MRSE`^?ZbodVPvxus+MXIGbB!(vwU6~tN z4V*196SUlB`3oiWMnY4|1dq}4vRT8|4M7n1uoCXE**BlNHrFN_+Db$LthFSf>|Y;? zCJEBiN^0n8YOx>W+h^M|sKC{1#`ueu@7B4iq`$R+#1WJP;&OY`>KwiQN(Tj1Hxscj z&u0OlC)2)i$1YlZuT=I6u16Gn*3OnR!w{i#R~|KkXOuTTalu8^3Q;&6ntO>e1NjS5 zabyBs9HY#zBCKz)*Q60%D7jQ6x!fyB07-n6=En>S@1;@n+~e$LWwA_DB0R;NOKs!6 z4e`v^AMk`3Eg$VBDmZk97qKS~*>O^2SdAN;MFgygqP$n`gi#S={DJ>SxQ2x!L3vw> zlCk=Qm^O3gJ*OgnuwKR}a$9hP7TXR=4thakK^euwzR9rUkEv-b5TKk*z+4!uNfjn~A>jGPV-|pP6~@Twd|@oAm9M3i zlOEL3LR;+}Kd=i@c2baZ&_<%09w|Ze@iF)8O1Iqhm{$nIkSrt$DFfjdA^Qj#tEyY~ zeJJ8bMI5ZljqVD&O>SN@((oc~(zbj}uQq--%R5 zCSCI&DnD~)zpdu);cmQ4hvk0^dI*})1*Hxwugk78Qa9_Qq+4(rR1rRBPW;m8BfPcP z^y6SO{m!&Cy5ZT(&_bL3gE-Mc^!J#4c*rgr{OFk)+#kV;h&Gm zPJiZ_*~qoqVqA@fHfzaZCC{p?;u`%DzgYyOy(s|U-NeT0&O&-uttsk@ODYApq*?vz zo9803%|-XljrV%!?sna;P1szSXySZ)5R+~DXL+2-CZ&xoh zAr!d4g9N1p4i5!#6pVF_Og&Jj=<&I^6w7mb9A;gcOf_uv8=1$-7_xf~4N0%YITI?7 z+#E8k`8MlFb!Jg*zgU?_xRjP*xRUr|LHl0xi9mVVq|Nd?u%K2&yE#y)+ct}0A4#HF zOP2-S9?x$V7?5r(B*X*cI> zWx7wV#oezuAEkM*{#062W)j@(0GpZ*+-&dwcfo~2Zl?fOqXUPaGPcplk5%_t^n{nd zVD9X&fLJ}45sCDDQ$j?%J47_E1oH((d2et^Y!Ms45Vsr3>KiIO(irvlgSVz@_y@x* z5n6SzW9Pgo%0f{ zmI`V@=<~ai$7&J~S}clWX<^>;@SKRTP~Zw(IK*jh$wso=vv4#^Q90EMHGDU)k|jt2 zpFebS`bhrJwchlVNn48AqauE(MasJ6N#k3oa6utNP@X`f<#}2vNe=~=M5Q8_<$}OM zIHqMV2`FSF^e`{gT|NW)RV!+{_&d&g{S&_kg=;x%K2?D3WPyz*>K%(2^IJPySaTzq z@Q^6pMz{XhM^jX>Iv}n%q%XKc`6keK#{8(#ks@@l^SMA}rRJAfT5WLndS@_yhcq&I zq2$8@~RomQQ88|x3}+mCY#^3a01Ev)*k&`@|pJ8LR0uVS5rWJLN)M{AZu>ez}^oKWBmSIh9ZQ`%sT7P`Ok&-}oB zI;p=B^k-Af&| z2_i`$a3KQRmmK_67ESvdjp@-78czdXT?RJQlq!fR8Dh4Ny+!^MzH*CN$}lt>Gezo4Mfdvkn5{KaV?h=O|Mp9I zFYTv2=W@`_=yW(%J1CwQa^z-Ar zn#uvPkWlJ`537bveayM1JX)#PGKPMwKU%|Gl)ne*Sg#J4BL4M-s(4PwmQowY^4fD} zkNinF&&1if9L?@KmeBAJc#_sV?Cq-Hc`1rFQk+S_>RNIJ6U1q7D*1cZNIoa~lPp90 ztF5{F51AJueduyI--5lRVZuM{vEfw8IY<|?KXt6Q*gFdF+=!5`$3EPjMc^Qij*=FL z!Ehl9PEaECA@*>14X#Z77%-08G!Z;}Pb*`gzo;%XTIP@Er0G`w+P&IEzR^OkMfcPm zJq*<9{y$os|9s6Ob5=1+xk~W^e{asut4-uB*kDcHcMF~8HAr$R_E;+MaCAqX;Km+p#6dKhwkaG`>fVpwrX~d(?$7~pV*;cw4$Y}3mF#Se_taq zXO(pTcPQj|L&Sh(H?)X$N?`Wm&yFhM&w?KUBP0>#VC@o?KGnliUpihlaH5tS;slGh zbcN?pLm;%_>n@-iP$cOj7c&Mk-V#_m7NOTD=K=ajIn*Uh9PV@zmg(Z2gBaGFGWHgvJDY-%0&E~|VVtr*k!jq9 z?y6`CJu$Y$cnx1iy6*1I5JQ*itg)Y(5QK{}L^%^E=B>AHlD?*aK671+6YN#s&1yG( zXvEz=UhJlqUS!cEqI|A4SDha(z0*g`M2PwI!_0F80#7E728E|2eN^2c#V@(H!J2?| z9``a~AxE6wmsqyAE|P%9FRmtAl(|nJ(*T&e0IO%f9Cv*(5UCsL7NtVNII%9itlmLG zyH>%O6=+Y~;dBGXG1DH>w|02s6j&*G!gGe5AZo5B1 z2Pq@65Y`n2lQgrruGFc~W;bNB>9z%+N%n^}ifwa7#Y=E69C(bG)h8sm9qDKYQ`}H9 z{{ZI9Hi2Qh%rC>QJ6~&MczARD;vLZ_6JzBm!0Q+lsHJvN_PZK!^;D$TT~XBfRB5zx z#hV(gsIx z2Tg=PAvv{>!jaFN&pOCwj88Rr8c;B{n6`Y~y{BRkas^}HJ;+znb|SB+HT{wlVl}$4 zeQs-G^#g6!R)}#L@Z5Nf%u{h-+@Z>79e+K4IIN1Jz@YK@*^(3QN_=`fl#eq_*QSXJ z9QV^;bAc|I>Ir8Xysn+l99j5v81NP$33bE?LF2(v^6_rsXp4@GnXK?nY=f<5ufnoo z973oxz7fMN*`=@DYOvAiBlo4D?W8V65MA@bC^IQ%aqK?PN^8ZFrqK+JJB|k8=(*=D znWA`oZm*h`tprV*->^mn0y4)x(>d?X+i3BGb^%3aR$5BaeBLEgPM(|}JRw6Y0{`eB z*|Jm-c4)(!K)Rq^>PmEq=K1XaQwBO{s^%JnN4E!IcAGL6YwBmBeV_E@OFLQok#{3) z0?=y&{|yuNL=2+YtVEhk#C;hEr>0Fik+9PEA@6=3SXyGfhevi1fHW4S&Xt-Yb)BN{ zuZbGxy5``2uJPXdI-|o4V};#n9kHl>tU(zU2#^$?&yfI^Fh8i%VxnO~|K7EtMOa!( zZ&&g9iBdBhITAS{VVd`dgn91k$QP7!6u>exW!1B*8!>*3HooO#7pt1*mFb5PCB+b! z3>fzJOq9n2GBqm$AtKk4!WK&Fc?qJ%;MPasnWISB0DAgt6ks;N<8!@fVj}Vt`ec|U zk4Hh1PGmc*^>UT0ZZkc|mN2NYqmJLGOC~>BK%YY1%M1VJO|7LBYWnj$>UAL#?U1a` z2jAQNnH4AFwu+M1z-zi*k?;f_RicT<>e&0#{pgxNZ1Ed2X<>Lk;5OpTsFjR`?=i~d zcVWnj!9rHuw?{?52Wia;TpyKw%#$qh`?gFu+*sg;HbPpS#V)roS!?U1hKADK;&5o$ zh!rlj`#ozwHE&P@{uKYy4o$(2$|p&yEu)fSVEW49@6wLN=?2XP@7+v?wY!m^DOIW8 zKrqai(g-Cx3+5XUc|>khv@Nl4CuDF%@bn{;_+_4yIh(NtBvn?b5dh)ohOR9`bBgPI ze}}(iuQ4i~Ael2I>M8+Y9>@sWs;-UiYd#gbRh`J7d(~srJV9zufm#L|no_F5{uS1= z6d@>YbDAvoEgIUoE_A%cm5X2t^tOM-ra7y2YUJG$hF@9?-8d9}dlQ_&d?Ie(i@Q1e z^VLuu4Xj1SXSA1W*ewJ+4G5rRqW|@y?AA+?RkSiI^)|6MryQmd6p=ygl)tM#4o9G} zcqiQG&niKOgr!W~=B;WH@qf_Vhs8qxKGF*KOntAHg(%(M-fWfXwzRhg;8k6;ImnQ} zkn<*vJ>EjXClPJWtO(4TLr!Y=3WJ4NW{9U}{H<+GytH5}H3w>Kq(8^E%5-tOGr+w> zImL;shJw^%OW!l-@Eq4Rx^&J8QDyT|Qlmlgq(dHkEpo)Fyx3w}X?gxVJHo+b&E&mw zl0H=!V)K)L5;M8uPx_xvTtb4N)|C1#wDU<Y(@RL4IBsb1^-j$$C-CaoyDS7-&)bxDG9z?juL3R6*fu zUkV^Q4X56BH_XkG+Wpn_A4c9Kh-*}+Z)cPn?9ffk<<0vC%xkX@U1t^&#YRdrxkd!E z5P&t1r_XESL={n8D1D+OLGy^`TQL%vK z5qx0$%ixgvX;9qSNHxm|bQ-f6MduOaiL^7=W-B}!Sk4K0nRYy4nkmkbzrMYh4qC6Y{muPK8fhoD)SNSJ!z9!l*KaO5KpBmCTY1%HGKJemUB+Yu0A2~j z{p=^C-p_+ZLP$YKNE*z#gvSXmeR&Eq7g9oc;=K>Kn#pWEdnf`#f>$CgY$jv$t@blaj)>X6+g2hyqWi6_ ziryNNl~fb0xd+3*5r48MExeTc05~fDY*vgE|0Y<=Ye9hs+IKu^o#Jg{V6$_^%snbQ zUE^4$0wSFA4dJ^rY@JbY2vuuTmUWTS-c6Ts|CV{aB|l!co=49~d3F-#b5*v@n#%**);wSf zCb-tQ1|I#DjqJmPhXq03Q@k3S;dSptW_Pi7PgsR@c)weU^C>NMw8Qwty7hkT;;od4 z=~feL<(#XyjAZJRGxb|o=S~r$#i3#nq}mEJ5`DEO3%ke(?Pq?f;iT35*vUCPD>p6^ z4dbB9P)Pt5q3-L8lTFyVdFGGS6XC!eL6YxWPFS_^3Io_ISYL*V;H)x%lk ze60aN?dc3YHdX?EUvltN^IWAHH<JwGY?=EKa6+x0<=1dnX0p17ZI;OA&?hHXrHHBog&b0Or zD}+8WV+yuIT^;qCa!z(_#6Me3^Z$moqUmX_@6ic)RqU zRPL|%7vHLbjx%RRv=I-sEtsR^vZ+zAQ)ZW5&vg!$!p_Y)!x1G)+(owvkECjU{K_4IOMvJynI7e(A?|Jt6;c-I+sPeJWYG-l2>1-as zJM673w!2=OtuD;N4`9IAeSx#kQdL(qLckqAY_-Iz4mW%AOf&-)!95Uw8M7JV5}%Dp zo$hFylKxSrspo@P{Ro zb9Pb|NP)nT)4&Gr3hzVv1-^GMXMv8SSFKRP=k|hit)P`Dzb(K0k{oJ6rcNtZO_#{- z1lmpm_m#|OTI$bgYo;tv4lpAzrLQfM+D{Fsp+$of+PLW!8%oMbt> zLaj=`BpH7+E^@0^6dKxKxW(rZ`PW+V+CpMf>uMih7Jf>}KW3RV_rp*Na zR_FcRx(TMX1z{coprCbMvW%V!`ofid>kP0y($uxq4Qie#wcOk(&ipB=3=>5xGg=$n zng|-=Ek=H(hTUb;#^t+50u6e>NK|(C3@9bTRW!1zXLj2QWnUit?axhGs_^b`+aZp3 zlcH!sNfmy7r&Her#*u*mQ^MXK!0MJc#GyXkM9xiZwGYSB`o=|Er|=B9;^BK0Iy0YK z+ieY7y7(72Qu|Fg+6MnUeoAl?MQ@?G986??UDi*2+RDKblpKb3byA~X2&-hd5Bg&U zZQBSxD;!gO5*QPEBQ2QRC04$YllA0Y=U!sbkFyObeF@DO%ArBanMSB#p7lenB1;}` zH3Uk{7aOUt#(>+RytJQ!=+6oa`QYiB?(vj?*bk4;hnt))Q6&sj(gKB5~#o1+3^(y_s zUdWAy;pEzX$p7Wb@Bto4G4;cfM}#Bl#HJf~$?}&gFCM}KS;Lzp3szQJ@llUv*)-s| zh=HE#6ju^=>&o~5UR>6`N?!A+axAMEu)xL;F4V(@m?NYm86z_$8PBwREO`-YAQO>z z)4+Xk`kOroCf^AiOYYY4+bqZ$NHMFQwifc7@SDe88Wswc>&mx!cD`ATuctj$It5e6 z32NnSV!0&)M^n(Z=jrX8zXr{H60$NW0Z-6PmBfUlMLVY~-}ILv4`-$dM5VP(?P4WB z@mQjyF~DnFYni2C8)eW_2b*R}#J9MV&q==*3KLcGhL;hk;#yEJy$0{NxNsrD*Sre0 zL(*YFtwlHJMTd>~68_8V{t}1Uu?(mdzxO*_GC)V$Fn%VrdV&bv7cUrG*C^! zci2^UiUHQxB_f9kIwuth5NthWoANfV*tH@dqo4YtnmYXQc&RsHxtzi5;?u2bTJ0CR zpl;ePqrl=FP8p0hxN$T={8>rbZ_a2?mv9j6T#>oa0@6sdsG6C0DO=Gy<;7KxVwpX)@%oR?y3FhoiAVdQ`Xat zTfIvvx<=5Jxw)?p>`AD6>*I&8(4qKGS*0x9Pgf6ucOcwU`uG#YJGq(K#C8B%t zKvvkpl%WABA31BU`)o&plV{7*lraqDy|PwcvBG3O8Lm>f3o6-F;1Qs(9=zo?b9g8u zCMIXMZ)+^%Y7Yp7q$aQm>=LO$8lpWI!)CMxHZS@Vb4&GHuhv)gtib7e8LNzuir~_i zKV8Go8R`rZpriP2nM`LuFihyPH@qFv{@Undb#}YGh`fU5Qay8<5LyCr@}C05&Bzd) z?%~{(P3l7US!tkMXQ=xWkGlUZhIZ*vYoT&;t!;O9@jZ8LFd)b?*K(e)u`Rz|G&#!f6WNs&9lPmFp4J`5= zcI7fc{hf^Q(}>!UtFc=EidQqjos2j&&T zlE2CDi2Lk8Jv868&U|o&Y~T{rAPGI zY+wslqAw`y3h0ZjIZ3Vo@6|bcGk2E0)%K5{py(xSXYi<;cXj2zDL$Y%i6&Fy1{n(@ z!ow{^kF#|lf*=7H1v#UUGKw-}yO~=a_Jb?qE9#VQY38^+)Lii4rC*|*t0Sp;vaTdC z=JMJ7E+2g)c6}zHt!DO;*XE`u+agb&h;9DTPbnI%EbUZ{sip>JmE`HBJI^Z04)>jG z7v&MBY}f`aqiv99GfDN#&#q89HzZ@Jkn?e}Xqd303AV()H=9_%FOT|-LLY@1*UOS( zVsY4c?ZO^qDeu}idUas$=1(@+8%IoV-M^twP&~IT*~@$$%GaC2VQBmVszBWQ==^iycY^92kUEE4mmMyw3Zg#hAvx?k^6q2t3GU`U6w}tL^)Wa zv-L(x?5k3u<`rwW-LNM(r_5q58S1bXLG*HPQn>LQe2hFtMy{%^orDJ+=sY;Tw|PVn ze(2XgI=BFmgn)YCeKPe=ta3T0b$C?dkL`Y!J8pye){9Z;E9f=?bcc8JWBoI3G9-_z zHql^QfB198Eq5mIsGGFNK(^*yjkOd99F&Y%wP(HFAtLnOHZuaE$*?z4`+k z8g`?Lt2WibiSnlio| z8Y*wQWJl)>FsXg6cR5V56E?)X$j1i-sP^Y12OGQ2!QzjR&&`Z4L{>FQ@L`0aO%cLn z4ac}pWQ->Zk$W9X(s~AnQkHZ^69DKbrb)pDz?qG!5`W;TuRf7+Mv(-}^H;Y2f@YIU zoQIKDHWGz!NUl&r7qUd|Q*Tgfr)?yi)c#ls{^hlEm(1llgSE1=9Q{)g%wVc7zUvv^ z>Yz)Zrs0+}{n1-L=~t@6>&i#|N3BH2!UyStn+JYq*&zMwcyMk_{a3E9L4xzcaWWM( zi`DBPWu=nTq6Gl#&bnH+%QU6$=X7MOXEjRPIsG}_=m)=Oe->OUoh{;P95oEGWLdhT zmH@NFzky-?UKfJc^e{|t1%A%$8B}UTg_+1y{cE2oUoa?F@m($P{g}W*rT2G)N`ap{ z(Z#t2e54#4H}6Rkn(xoTEmYwONt@6$V>E}ejo;VN-P_S)PEa17?}|z{MjD#0R`hdk+3;6Rp6PLyhEmHhG()rT_9V zwsY~2y;hWkhE=mcePmM?y@k4DM*Lj@EDh8wAxF(~w{I?*OI3sCAjsc(X>4cxti zJU1M{PmwLd3r~h4(Wcyuv31U|gmT;#IkTZhR+1N(K@@cF8U9?;a*=9m$YNWu=-zIS&l`I*!GvXCUoSNTX&p1uzM;| zyheBXcNO||1dRa%fqkHHH1gMO5e%f#n^KXppO@J^8d)Gomt% z4UPRzjahUR;G^ddC{VZ3F`Z3`9mTF$KHbZaH%kg@NRrjQzLC<&3S+3ZRza@>mc80O zc&xb5Z_k-IPg86v3??Rb{ZWKwv(u4NOBSP;IZI#N&;YvuZ5Q*s`Ia)&VQZlPAwg#% zND~!{-YujpJGW*XDR)S5_9%|S!n?*5o_q#}1j^n?0BA81I*q>6lj_s!R5f$qg->}D z`f8TD36}M_L0&Y$&>$}Q6{XGWvW7gHSph8_QdrG!Olr9p91ERX@S0m9e0zK%>Xq!4>Eml&Rpz_)7u52Ug0j;?U#i*7 z{LYP&^p=6&P0zc-WzDhgYX`=&wOHVkvR|L)zRyMDO^7saNVT*l;D?hz91T*4XL^5G zzv#R~x6$7PW9A_oq^~GmDcw&{kkX&N81{cS6r`y%-pNM|(+OzL&*#JurXf4+jlaQS zWh;`h$!zPzUH39NEQ$EFaUFCQnp4et%CR)reC@`qL^y^wU_wC)mQ`!SV}?6#t2(*cSl`U{Vr@dFYT>z$`F*r2 zck2WTQdkh#_dLghl9E1;Y})BuMs6Nw(KU9jkyV7jCS0ZfL-zE$@AG`+)(;jVba<=94LZ%^kxQSFH!y)oEw;aT6Bn9}P*1s2*-zxqNvXk+{-|KAsIybh zX?ji_*Plo~1#!Arp*lGeAv~c(?VM_6L||dFS5zx;H24D+wb(%mecaCH`=t`ibv>@# z)_hJI&G(UFwA4TU4BDR~dCulUVh5OY%|;tfj})tnJQYY$CsNcOz2(1~ z1IK^!xN(tyTGe(e4UyW%PD<{+Z{D32uQ{AYMH&Zr8+sEA-^nTm=(bQ}mIy1Mp=9d0 zk(kQz-eWa^pbkbGK7TL1c}7LtI-AF|&{|sl+{p~Tk-}gw%ajb;Hx{*v#{+Lfb`_#e z8?}6Wrg6YMUvZf@t2;4%zPc;r+R)dZz`vc!trL#;WRrI6d3l zAF%G(8?anCLHYYq-bX(By`z2YCsX(*mjD#=amYo4-`oe=LV*%(1R}}5@c$HTBEz3o zqJNtg&OXwPj?nAMSrCP(!QF3D%nf2S))N*D7RPnDBGjvbPcYiu>UH)+VEtrY30YiP zFXMhx?2XI}EvrKU*z6{$Hrd)1aw5t1_QjNkoo7Yv0t!92k1^x01~EwmT1BpVxVpD zEAzku?#Ub+@4wMLC7H&KXk4ycWC>T7DRW+iT{3ya9o63@Vt;041vvJ0DXuyZ0e9Ozv$RM zfO&liuq|@D!8tx28##&N7mlHUaeQc{=!}bDb?R(ofq;F{Pg6z&^Xhf*35jr<1va)be@+VMsgHyuR>*r zhYIXX!Ml32OR7H5Bg2eAByK|ixdQK8#>sR!rL53?h|rICI5xhD{?BwHUmcV6vBxH! zm>j!)VoXr#oX%WrAS%4=Z%icRH41@7`vs|ZXzz?QzX=aHU6;~-QpoH{F8YWe^9#Di zlP&$SM@2a#hu9v;>BhaEG_W-KF7X_qvYt6l4bhK^z~;P9Dv@aI_I2|0?laEs=x-;? zO+F_&b9nYNR&U0fM#Ds(iIPT$As*X5`70tR=|h22AhDD!OnFD zdgck;%uxJP>RQ@)&#K;e1)IL1Gad#$m{Xx2o|<$>js&&>mFa!^CUfG8+Zqe%QL>Sy z+r`2#kJ)i!b`tS`DR1DttDpZ~!V>wME3vGH#%x$0Gix zi+bpn)dcb`PxO@46k43=PAaD(qYk^R+1pGZ1PQV=4D-5F(IOK2j~8wo^#Y&kV}m`l zD0wNlGYvv&p54T1Td%$EF1a|8s|6jegSev#EpLpDEaX&vV4#re-fP^W(Dy%;a811; znPvtG&Ht&k+Fv$wFxyJX)aEt{uc3igcOKXjfW(3VT09bvo*wK`7NHRzzKLgf@z<}q zz;5!{!S-lm7o7#lx1NSu=;KrQ=)o}zTQ}vOO$+dIm**oFx2G}nIkA6UCzSJz3_I_m zx-u^PDg~t`Z4JBcBqsPB@m!Zu!OdYOhO*s5=#)k8b0zN^Eh3EL)~*fWMiV*n6Oy!f zRG&b}&BZd7M6MzgsX2O`s!SB0yZ9`AH2;QGH>db1M|eTw%hNtSqhI_>w=q|G(~o=2 z4~S3B5kx3+NMTKM3IM&EgRL;CB8V5^)Cq$bRMYqF#4bb z3}mY%Kd}JW${Yyh*LtBFPl5*H3P;8GCfJr>moW)xIM> zDn$eW%rl)v@8(zhcJ@!Mf9s0hR@>dHBhx9wh*j0^+A3r- z_;O`xd0V-~9Ke9rg<}sWItJ6Q^P~HC!K*aUIFAw15vE69=n^)>BV~P?Xw>1xY_?^j zHh5x9T*kH@h2t&rFN3{COJYVxQx)q0bpjrV?* z@uOR=qR%UDn)!MBi$NWa$sXIn#^k|0=#}x|Z7F7Yi$=cXQj~^@_oMI15teheJ1}*Y zH5$;lBfETChI(~08l_7x1{Zr)&9}hji?J6gZCOkx*sFo~i$RR#GpiaM*=H#vVWAS5 z@YDiUt63!sv)YT8whF}EVEyc+=@Ajgy7EBO#?5YSx?R>L_Qtw14&R*J%Qy)URC;dO z4P{O!H7Fj)oApTioF)!)&dj~+Egj(Z5C(sXQ6fqYQRcEjv~%+bZEG-1~{9 zbgXS>Rno=*7`=16r4u0jInkX^lijPEN6fVI^FJ7vW~i2b+C-&&SMhNQ=hzarAxjyCODN`LxTCUwKt(yWIA1C+%_d+!#` zc#eVPT#y84#@q}3oWE<9dOQ8O8uG(*$tNG1q)s!c_vC7vS>`7DH(zB7*Ncwe zX6Id;jLwbc1wLoB@vGCvmz3#;Sl(deG87-=FH!9cKmodSfa1XkgA+47q;6=*;X0Op zipyn>_JBh%0<0RS7xDDMlw1@aYN^Y*Q7kVi=y3S+n*$=oy8fR2864$uydQ1RFAo%5 z(;R}nTb?eS8VOW{X2YxKN^HPbUu>Fq$x!EiRcu3TU0lr}`s@MX1Yr_B8L0=RLD+V1 z%E>j1y@aZOzo<-u(9?d+Ll(uAk(Bu4=%7&kpf1nm74Z~9D>aIfEJI|$ZO#+>`X#mhG4+2Lnuih>Q+ zbJb04uyn~mAOmO({KISL`7ccs^`s;2h}R`?XrobOtZ1kPqd8^mH&L;UzFs4BNfWyg zKg{-K_S%_FxTqFfO0j;&Dh^1X8YSvQ-^HU?KU}8ZLw%%_Idx&?MOG|6g%0(N+DwA# z;U=Ius|{F!MMKDx6Ffbj^LAD;JN1t(zjZC*!5M7VQ;DwEkRIROhAgyI@lP16Jh!ON zVEVlk=?8y7JP3ocEH7}_P+1U}Qua~d+56d~x&X1{Q; zi~6_Uj!0WbBsQhY)fmETFxp5J6eE_-yCO}3)2oGf!7feOCw`M-L%xHxs)!#rF!&1W z)QMkH@Tc{Mp>PjIzBg+iuI`R(KI|T&pn&*EBz{lJgksl4?G_f_2+!h;P}nt2JMb`q->AkMpIj^KG;)G z!TlWSl>br&TfffA%Gj#@TaSHUx^H~TcH2<Db7`gcYd{7r8^Cs;_OT98(uRsoC!?66d~da zD#P4*7L)?TMoLa38dAA~$+mM!M3ANMs8m^pXD&>pw^z8ZrlxHcva{)o=kEL5MzgZV zLQ+9(6lzlfxutBp8Q|AQdjITkeb1LWn5!0#bIPk0v*7RY7$GgJz8;`JPeha^vlxCg zmB@?p)L(WP;xmrsQ3{T>+j~;S(ol=3M*Rm849yt@ioTt5nP**$OKqmL*`26ZANf*3W59;f9_|C*ATw^+QS(Plru<9Y(1% zTrl$i^9Ci>X=ChYcPysy_@cl&8HI^B1d(wWQ>OCHT2S8TK5{LvF@_xaBkw_~Z?e-_ zY=YLT!lb2ECJ=6~58acDGncn>JWmBmuF~t4uk!P^erfR|K6~c)D87*6+_&$F-%!z| zRI1;D-yAGl!bX#`^NUlx~|#Swr$(CjgD<6 zJ5D<6*zDN0(Q(JNZQDG#`?;?7H=O->eVJ>|nzP0jRkhCjLBEe{V)}vCMdyL2E8|kk zKV)sgeE?m{(_YIfb`ov7UG7jWB6-M#f`0fPmuYWMdJgNIChJ5@KK|{N4a_?Pvb- z1|K5>3Ow@p`H1C6$L$It3tDbx2G^wV5rI-}Jw5T+%V~;;oNjg;H6U&0yiKxxZfm>l z1{R7%35BWDJdjsgl-@qP zLqbAxFy}e1@F=tsll|lhx`ZsQjV1LE-8yKJ#4c+m|g@ zW!j&lf=L{mxyKhV1|O>^t+|(9_|i-h!ca==4y}etSk8}>BULL9`V*P#(wje%M636z zGrXAJ>fV(95?Wi3fk}nqJBZDU9eZ3pa>~TK*r}9yDXsnr&4MFaYfMXC801$kP%Q9T z{*jO_zHl1a0x9xB%7MUtrEbySSDHw#06!K;rENBS)5ka|)BP9!$^rZd?YR-G;@j#5e2b{Kxto z&;9CuKU~E`{!;srJ`4+nQ*t>G52L?Wo|%l@njcqHQ5DavOsQ^ixq;Vx%!ZQZ2_^%# zk-)geIVBm=b<1!4=rq9IWWgcy0x3fmP#As3t;TswO>;gF)h$wy;v3;%@(?_WsW$LC zNT}9Ls0S{XMt4+E200LZ)%(=b->TepaOmH=L$0Qytojz2c226aU=+J6!zi0`KtE<; z9_|knaa~_y(;2kJ9S&ls#n#>7*}~?XB;f%N+%zGzrF{aFOKKErjH6CzGeb9^!$ZJX0=@dSWVpsB%-5hV4 zv7l6&NE!mak`-7!=I_#OuQzOg8+X;}cYXyAY{ScPYita-lv*O`WN2&oS#G)Re7t_1 zF}6pJS%m#}cSxA!2>i!fQ~KskG2Nmz61WBA1mF)$yhtYngWv088BJ&Xj)@Ss_le|K z6*v5MY%jDQ?wcv@(*3QmHmGA?G>&2Le=d{>ew=ke&W|2yA@YeXQqdKbNrY{FPS(^s z(OVUou9~^oq^i6fBy_|7xPMmEtkQ{Q_wwtIiJ5%FfQso8^c6fsB#=JSx!Qf1n}`ww z@M!uRzbn?|LfBCcutY{|(O{l$1t&Ha$xY_$vXYCAU`Qbn^^v%<{# z-r7PP)N^<=?Pn=6P*_dy(V$)LWAa%onMd%)^RYN%#6vm5#o&ZUI!zEIHjj+Wg3fzY zO&Of!A6=d0v<;OglJMJ_@}DZ?gs?Q-b&RF=(kcy;OmpJ$s(9nKKGC)O3@E01$JfCl&62| z5rA(8y})X<0kC8C{LPHDaTbCkJ_fOzH}l#Kh$7yo;9*nf_STm_E$Ayf&l9!|2!3Yo z>`6Gk4_MqRMmiYf8FAFeQsGy5prPxr&)hK|c74LIaG-pIjUm%^gSgeXicJneodWO$ zvTzNqw>Da{l+h0iF)I$Jcz#f~;}EuAUN+Gl`QEQb5y|A@jUz}Pr1jrJ7f4ySNUcdE zBd|1_1hoX!h4Qe(N6PYn+XR#PKjcb0cDt%?+;Pn4iKm7y$V8zpVr{>@Xm*@upGLnRm6O%vT_2C?E zlt+DQNLn~Y!i!Sn^6Ryt#lnW;s%Y~Lf2ViZm>Y~QLIy_i2ZvzR`n1X?-7I&X5Y0-4 zunvzEEF2lChGiBjq24{E+v`Q+27vE#aU!V*zwi|N1dXT1f_E7Hd;$`6>eJ+nMS%tu zom~Y;BQMcMdSW)`sG{@i*!z`XP;C1Br*Va5;*U?@-c@}#?B&>)qipgVR$-_@JCkMV zK|QW#bC=uk22|K?)yQGpm9c@%BL6_=rXe27Y&kgeZ&c3H-4Bod^tjc;P08X|PLoKArztsdd zoptqF++c&zef0wKqN4*vq5p22-%gvJ-^XPv>%1Rc446UJHoe+t1v7wAnn*=sG|4G3 zufwP1q6mzBL9Xzj2{-jg;1 zKZ1}z`VHD*_G`0gIOw(Ds|iegI51r%oWWK^$gpR5wCZo@)?`rTHYQPIv_E*R`)$jB- zef16w1*1tVE-}6Yw&@?d54D3$P43V;R!E+1i}vVoW1`}<2dgtnSuG@q9Lu&VIn7`7 zkz@LQ|Lg0U>{M!bo9Wh|7gaR3*nvH*|A$cQ(vDr2+wwp&QE4Wjt((1Cl6XWrDk(N~ z7GZmBZM{XW5tE9sPvv||UOMmyL@|u!YP)BN(F9e#p=;65ep}k5m^hS7zKAIy&`K^Y z^PMq+RZph9{-WZ}j$g1XQx_j5Y)vt8b+Qt5_EwW%eqkx3BC_4)KkuH%?jvHuBt_KA zT5hq(;mH!HRYuU7?XG@sg4H4e2IowTYc|jE`F_g$Oy(Qe!{j}!qJg36iWt?kS(#(( z8q7kM{s@W7UdwKjH|>gppec$Nf*@bgqg4=}Xx=6rsW-<-nb?6mTYT)CPn8VIKSF|e zj0B+JJnqe;805U&A?o{JS2fxniP#@))-8VLJK_ARL?9HiJ2VI3%cvItNz^Z5bz21I z_N8A~!C-3@)7rLFwDcKbd;wKHjSj{niGNkKV!sv$`Qui&oP(^ex*Zp`pqXl!nrF<$~phHiMhn09CeRvAhb8(B#&a+CgB6p8*xH z;ec_@J4jpWJ<`AGzHV{x`_d%e{h<)Uf4oFVDzq<5V@R7@Jm;fJZbM8Kb4pB*_`Li) z*A-e&{WFQshQsnSMoYn`H&826=?eS8)nY=4m%ib0v?L|Wf7!ALIkCBX-tTEcMeYhH zDP8%~3NykMH@H*$&ez?%D7XWRb)V@H>!5N5)Ptc*XRH?u%m-KvYOYtP|oTl014Ez1ut zYJ5`EAGA01aHbBqaQrDinhv7Q{%AOjqNJ@%N7pr0edh^v@2(NUt;j#=pOnV9D(54h ztNRH4Z%(*0FY?kOQsANE*p8f;wlM2xyCZtH2 zPijt6q7jAAkq$(nkk>XqNkR?HBZFW87e3n2rihRzhhnl)g_mlN7S1Fi1b!Sj4x z-+)F)uk|K+QSiMs;D2kghJah9-3w`A%RcN8WS{q=t49hL=mJpnE}0j!G#Q7I60(!1 z(8-&NA{<}oef~KPQHL$?wRm56M0}_;XW4`%37xT#Pa3dkFs~R@ZH0yi(tau}?J<|A`R5EI8tZy@~)U^E6)!!2p>Uawv_OIfE;ia~FLe zJ6|C+s-1>8tV= ztXNnAzY!{ggFd$($jXb2K&lD*Jl@uS1)EmN9lOwCspS&EGff zDO=9NA3ASq^XDzr1xx?QD>tWk#A*!rod1{FU=K@RnBSt)Q-g?%lKQL!c(y4_ti_tH zI9>Kx1@FB#?$75nP~0x}H8$ji*Fw!|+u>YrG(AnH!Z-~I^Ly-NjLHXxpx(rG`X z$YHP~`@t`zWB-V)X_7RJeu#4$u5eCbb8#9Cyl#m?OpqX;UjwePBVf0Tq@|NOUhAcg zj@e(U=`OY5^l5LvO&Rk#c?oxx!_4iiPwWHHpk;JWzQA+Lczn^BtpIO`MG0U~XFS#2 zV0pGX+web}c%2;lSM)@nRGge)1-xd3yejUHuA`DbrWjB%-#OCQf3Ygm)=C{pF{!~+ zB~q=D!~7x6$FOxxFlLE1D*!7OiZ(0}Qibz+!u>t*GFC5KV>qS)gii^ta!i#@XvHm6 zRoiccF_f%fgfLrJ3x_!iJ9JYg6>f4UxDf9BAkwEe8^Qohu7adkq(q;=0Hzlc6cDgm zQP>0F6=;mkRf z|7`&Im&i5PbMy9%9#QLvg&7nh@)xVdSOIsqCd6HRhC6W%FCO}f!gXaEGIxTDyUMpQMY-e=paTv z;zCh~3WfBc=9P#$szB=PpfTuwL=By7>@mwy&j7M+PhocP?R=ccitBwpFixGB>e+{$`;W>ZASmI4@b- z7Q#lb0Tu947Y|!loOLi`L}#fBR<*`SYR| zCcCdEp~$1zzW3$@_*#;r(x5i(f>vWY%ZG`^P^uO`LzAE*)@th&qg-kDs8{n$c$i{* z9wG{7SVsEpal&Js$CfrW?*v>n5I$QUa=UCLY2RyU(vjJAPnWH3^F6AfGJJ{&XSK=n8RKqEMF`5sN5};7+eIinno1cO zu6l+NcSqshWM4xowOgUV5F#k?frut$b*)}A$pvL)c-f&4uD>=W7I{&84oM-{thp%< zq7cTN-2M(3(jWmUo1n(uxH~ubw{;8mZaP_Oql~<7ZyS(Atk6n$b38HPCrCtz9r5ti z1~H*>y*s&L8ph^Jg|L84p8%#a7RSFaA{2>$=+_{)xb$>->guZKv^gTo{Kp4s6RFwI zfX|~Uz=jKXMh;=J*i;6_SJbT#RUQQGw0yJ_5T8Zh2jQX+))x83=8T zIMsm6W)3Wfq)eenff-7YSO-}7SOqF|vDhmd4F1bQhRv*7=_D@P$%%(%SG^h=P7%7i z^zpSg$W?N1qh&`Mx)u&~W219}xZbDizxJrdSsvumXsbkZat!lFQBB8^!kbvHlEWDR zo+#vzDg~nq(R-h)ziKJ&qoR+G3Ki5?e}!2*3k9DqWz3oGtgG|>unwXOgM5^OFR)-x zOs?}iGS^137TV)tov@P;_|T> zv7PKy9;8b^FGWrp9QVrVp$YhEK2vxZ00SjRYM!ZsWd}irvj~kp6bb z4~eBY{RJnu%qjWV|FfTq5T4#WY3($Dc?m2Wpz*f3`@NOxv!m(MZ>Fxbq8Wh+SU~~F z)x^H4Wo{2X{60wj>R^k`Ct}evb%w4djUhxm!+LSCsrYGXuERLap(IM2i3Wx0ydfjH z^Na>OivcyDitL+alGIaZl3(#WLo0mq1l>D7)jSJ z@9rTHom7p}et!0ihg*YKCHRC$!mVRG08(ECX(YVG0?hL5n|H<9<;O?~LB(Ou305M7 z2}L4dxAIM--jp~r1f1W}iu+b$snt3vt*O05&Y{3ho`OAJ_FYVm#dSo{O#Y^Yz9$AbBgO%6aByc?28N*s_FxvjRb$M z7z{tei{HhR*XVA*HQrK*4eU{F+YXkA-Ewzxm`LR_Y|iN$rd^t6>1>eUX8A1f&?& zAg?f|^6BD~;xYUYngNQ=vI}e1p*it~uV22Erj96RT(RR;f)^5kl0sp&F5bwdA@mVr zqhc%zI^I+gHPT8_lUUA#(-U}oCUw|o#^%F@0uXL7Jcz4<2Lrdk?Xzyf2b!Y=ckud2 z%1lQdT|JyW1AOItVw!S4w^h3d5FqV=1@3ltzK5OQ|KJ?`rdOvqxKQ}ZLCD#rOH9jQ z2)nw}ABYtu5BM(vu0ux=mmM`_XvA|ImJAvkrMPqrR82^+aaY@6&gB%-ZDW60+w(_= zz>QwlV8d4O+7IEXaR(D`~ikn-C0^lcRF@)YvgTP+Y<=?`L)wM=gz z%Kha6QUh~y0Oz{{Y%Wdf`y)JM-4Yi3#tFHC>QS!0pZQ4*(6sz}NhSyew~y2zoZ%3r zrurfUlPo~4dYaB-Au#!jZ-IQO(su2AmsfLK*JZJ##`0yA(J%S)fz*%D`+P_9xwDIZ=7a%-PtJQjANj^RW^lpZn$ma(zBcHDhsUaDw`{5~r=$V)iaJX+ zO5p1SLQP)piJuM1h*hrc_ma2n*5T!!b&`Vd8^tG?h2Nv2)wN^gHMN-6L94s;v&A%H zG5`6N%OBmYcyco(;#cD!J8nuRuhW5|y}XWwzvY=db5@q?oK59~6oY*Lsd~EA>swXC;AVpNw=@17$d-r5p+co_Uwb>sdDS8wxvdWw>Q~l8YiGWv? zRUbFE7djg^(@NLy9k6XOJvM6jTyRygBCeJX7nkeDG=e<$1a<+2=`m^!pMYB@Nm$ZnlG>6owirK}ic9RkVZ zHCqnDQkR_jqyO#t3_ZcLYadl*#_~o~&O@Ol?lvUIa(@TMhVwPW;j+hqBjkxwYkgN* zV?ACS$GFB2SAzOZoJiFg?`jjo6QH?$h!!#{Q!uH3%)`JyU^ggb`h7|JzW1<06$nF` zDA4nl{{vB#(APozHpHFtt;^^KjRZ4~8oE;FbaO(^=e;-QI6j)vX51%>N?FueR^Nfk z(7!I9&uwQXrw328vdUt+Q{~-#aSPTVJxn+f(Og(lwtyfaycO4Ydds{sT#%F}_JJ93 zv+EDF z3v-Mmmmg!S&*kxxmoqjBbI=@iCaqJURaSqhP-TP$ii@i`;t0L^t`@5Ua{Wr6%w3dJ z5X{PwQw5m3A1@?h+aZ8|r$nInh;YI|i;(Z3orZ;|s|==Sc60mA3Xd(>GIloE@Inl* z>xhPWpj1r}OMcRDTrK=nwX3V{1@$)a6KTTxj^qBPaQJ}9b>pPSI98r~x1{}^HebURPEU2BC?k&Hp0)Zr?t|TdwVM!61 z1?ijmcpgDAtOZiR8l<_Lg!^mAnZ@6I$3`dfiI7j`bg0|d!sjoW!%WX5_zbj7_O1RJ zV9voHwJxPUn?cl9Pw?~pbu0>-Ew{F2gJ9xzT>I^;rphdM>W>T0{CJQt7ao^*8&~^q z8|_-!7W>JADzRG|dkcl*rtisQ^l5)o;nznpTEDIg6fTnmJL=V+hY5$~&il|a35Cok zJKm1F)yS{DO;#zjb_$Tw4E0^KMt*Ql4!BrzaRpEZ(3)~w~v%{xm zGjjvKi~{X2#I%JfOSG%$&-;%9MXje)Nu_xz)=QtYZk3zb`?5; z4Yw_;!>PqJJ(pDE3qdSYkC&MvCHCkKTsHlYmc)}`)G^Uy196$G+uA<=Ac)>driL7! zm~m*yM4Bog>9qZyu4a36EzyD>ZOK6xKd=GnMM`jd(4YDXsNPv`1*{iC4jp>0W0B-5 zJx+LN;zsw&$Vpf{Fid_gGTIt75||*o8TniLA2y4HZwA{xa;aJ5HZdm_f=>KYxDyny#HLU=mgfzOMF4HoEKVKKA>JMa<#URDgyA zQ^Dv6i?0tEJ<o|v*m)sQf zK()QT@{0hxe|v&iZKo@U8ecbf%|C8&9q3OMV&%^`R2HT)Dnb$WqgQG`#tR z_=8E^F-9lN=98`aUgI9=gH<|?{!t}y0F@?Z(H@lcq^hG$`UWB6s+&T zvXfRiO>_Bqr9|UoitnG7xQ&zWcuu#{9znpyIxW|uS?;U_?gk(P7pS-&FnNZu0eM2y zzb;WQGkqyS@ovb0LgrH~oQZ#S^f+d_;&&iskBm4dmn|W={3{@q5C#QE!f~^F7!DA3YId6VjJy^zZh- zLkTDZzXn}p@S5c>T9H>(P@&nbfPC7`JK8cmt6EYuJ;Qo^W>v})-UIS{BA99^e<`9sm!5qpjPr(bvp-;WgLKnaE)8(o7SU#$?lWVdrXd8p<&3Y z&K!J|i$8OtPkn?=LtcOn?>Z1enSsJ8m{1X=sGw`~szwbG4d6xdT7qPO*i zCwsm7W}mz&9LY;Gz9FaIEtb%ov>wmTR-_n^qr)`rk^(FQ{)W_xXfG zV_h4Va%7*!*L~A|Z8jCs?66}!0ii|Lnt%KY;qE1g!St)H#G5qJp7QjlNbzmYhW8&yb^+)G49(!BAXi(M#0d6pOo5xUJF=$D`6a=(eBa+vPxHe7(F>=w>^^DQIelokO ztIiyLRk5&Nhku={VG+%*gTc)Y$WUnY1e*IITLEm@JjGzvbS3z?^*n4u&UzT&cOMoAZK@Ent&t- z&Y{{pxK}9)j#+hbLqUrz(Vs$w7O{~n8Ch%Dj9IS@Sk*@daGxGiw%lfP2ZaS^s% zNT18&W(wC8XB{Dj2?5p?;ahwkY%1{eL^nhai;)65E(|GahE5;Vc~C%y)0smEeaK?@ z0sI2ns4#Oopy>^ZkM3K;)#~V1*OxBCrsSd_3s2Zuss>LEUDMyiIP~|e`;NG0SRrt| zfaH4~Y=FnZ{H||2d*WxGKBQEi>k*kDtpwLY7nXlGhlVDTiAK)LBMpfC4LTRZzEc^# z=JTqY1cy8Ef|)5^W9VO$_3`BGBH*Vv=P?Re+s^Nky92-ZhkHlP=AK%sn{xQ6`it8u zKe@WSj&w79j9(qYi~!MRx(qL3(%0(u<-=P7z2FP<6`gKGx?RzGp9 z=$645->%rs2#{+qHD_jYwP*@RoK!}O>FJ;EFV%0B8=Jx9zCK%GqKUS4QRG?adrR_J z96vqknOx+A&~2N<%_t;YxBT`NT%BGjzdL#dez?#g3qm#KAziNzg9(Tflczd2dMh($ zI&EMAdT7Ns?p#yuCm_U6rrwRhvBWM%*~hj5Cmsq5=!2fOh(s2DGoZa{h$?zMU?Np1P|&f=#|H*Q4osp$?Np5824UsjhKR7;eM?y$INl@6vdj81AUq`j zfF%P1|9^VyZ{Ha-L6DdPuv?dT{+9aPKE1_*a+KD&!F8yV z+n9k-2d0^H+sbh$vl!=^^7i42X&&%IGxc}Z-_*3YG7Q{VdE zBYbx{`e29n03!8HFB1*KSMPzwtL#qd%Z!~nAxV%)KB4uepu|aSZoe6AkR7Pht!G(~ zX8EOQf!MJ!$<73iF>baJ8dLS~E)wq{&6+OTk)0tz`TEAp7CI_*W7|!x#`dPV-?pk9 z(qkhK@(JoxT=W+mFY7L*_1HcSSNu+g(NA5ij>rZH*2L3IbN;@e!BuZ^Vln(r z!BaS{3Sq7qPVJzapQ8Mf#$h7OMKF^bVM`NOnSwRDRX(}EC5l*Ii%U>P%|}BIXFN?L z+kfh7QaA5VC&xfflOThsz@f|1V7r}X&UaoRtcHZBA z9KE08P$;JN*!csC0e#UvQoWHwAAr{>k#R-LHqA?7uC|y-r$tF7Lt{i`4R7H{>;l;&W~9<3iwk4zKc$#9iLhI&DA<7jwP# zK-?cwU{qO2j9DlJ6A?tR+8@d(2poWEukyMB3SXHbj8)4+Pe1E=Si5N9y_i2)17P&* zuS(|5zhegeeLu~BD|m0)!Dt6!8*NvpnKxYxy$}81 zSf6pU*)EKdKtb;Hu5n8ZWNiMy_IOna-tq6&<-y_C8}#NalSB?g)8RX1s2AxUw2Ma} zhGt*U_mq-!_E_=u#*pa9lw4`)Sruk=WWmigQ*nqKkg65Y-G>gt`;Z0E%E7V+T0#rJTVzunZ%-RjvJg^e{|ZKIsmy<$()2f z-)8t*^$>XMh^?amH@D_674`4%kyMv=`Rj~#K! zpT#wG-%hH)Z!|IhLE%|VTU!NFEdzJC-`Q2>bOItBz8L9MPrVhB2CVoy;Sy-aM<)DQ zyBX$Y7Q#@7SRI*~gceiC0*H_bnCQ#U(B~%$fx;c}uD#;T)Ol?osdoz6I}$KC?f1$o zBhq0fht9;9y(Th^>{ThKvW;(Jf&mZ|3gL7Sn=g%Rwj&y7IjKUPV(;?899a5nKZ|BmY1pKkPw zCn}Ql3!x~~ja@PXWCZr4BqVY6OnkNG9R9kqI*U-&&}c5`@uEmP_{}Kai!E^1uYQ)N zOFz%fbjM^%)W}(7P;WkvLHl3tWeV{dfx2$JPA~`4^Wu@iRcoWy5OWGInjLe6kJ*+& zM!u6^MPw|s@4*$ZIIGXA_-3F(@e?J}^|a772)&neRE^g4D$+nA?7s1(f2xXHhZM+v z680S(C~iID*yMOw5AA*UxxOlUVQY8&>I=*P;RYtx;T*?hx5A4Sr6@S1iBLK|Jtx7Y zH+=kO9)i#~FBS{>dcrKT!rYK|@WxuM=2P6FTl8c-`y>fGLUQMk=? zwLdVbn%G9u!wG>*p&N6^*uJC3VsRBY74%v8c6pP2w^^L1Nq`NeMJcZrvm8*iPKyeC zn9^dFGh}|(6rgb?fD7jB*|l~QHhyH+@58=Wss?h95C6GKnSQDbDuX-?FrOf{4O{6e$ApaMPlFqK{Q_>sgv9N;{VM(cts5%UZ{u zO0LeWvbb8|>@Avkxl9qfIlV~BG2`4*c3-?691*Pz)N~HbURaE8RE{9% zlH-tE^Z$8|kpbt0p(|USUYdlMF^hg86R={2=n;y4vk-GAQb>~}vMaN(9AI#k zm>ApjxEv|V(#F?b?bI)KhE`H%3;6RhuHPzn!bB7f;e^e z9wspzxy6wVB2Ud!d7=38h1Mc|xGkLJe?6vFwD6?V+TE-+zPIHwB^Ee`o>;gLM;>kb zhLf~4{vgGi?|e5A+I2P9X2$)H%1IGu#$^z+9N}+_+HHTN>gRvu8RQS{5vNJ{YaC0& zOIu(G`al`4Vf_3!)U}p?A288*9wQ|K1e6yYAMbiK47e9=W*txiL*AM(QN1n_BI0Pt zP8z5yu?i`xvz)+{CF{*EF1cK|3hvc;e+HL(0teWch1qG{K9alBWt-vVk+T0WEV}mG z{&=E(IOjah{+XJ^`cVuz6{QE58dKBI0P(R7$^o*K++|e@6v)~Xj@Ez@Z0P&KbUtqX z{JPliwoN|3hrGVJ>$+;|INF4zFH*9kY+Tn-69RTZ_{}gFfN5%N9A#>6I$7!@E7xI| zf?cu;&$;ni6%{`@7b*f2jLwKEU)OY98|FYIx9G{GyJM(+4#&}$xkM=J=rvwPlqc3`qu48Y%CD&3ebK-z5ZG-(0Y&beh>0R16ckKyV10NCUU z{AE($hP~sy9?T}4zZ+R`A#aUK$tr#Ifcch27yH#erbKT#Wg1&q8&SW|N7cM+GNR z&rS_!t%Q1Yz3SVMS3rx+3R7|t9Ijc1g(NnVVZ3dw{-i>y@gy@&np*NcOSA@J5qjl% zzbxl=$g8*|_su<=F#$zFZILAb7*Y@zHsWJ4Fj*KOsU^ zM1Y{+>nL%vU2jB^jE{Z_ffNH$U}Mej;IV&{BfcP->hZ1Bl`Dx47li^Qr-wR5>RckG zmnzzp5;ts>LxZDP>@X?WXnJ|>*^0%l3Pn*S3g5Jvvpp*s!89r8Ho5}km3hC`h<#7- zaudUZ2#T|nhX!S+fE+mSE!A;?yJ^u7n(J<3p-2wKj{fVu@jjG*Iwo1fu|rW3a89Dl zkc0vWv{Umbeul7KKiZeiQIX%APjsb9JSS8Ssc}k{gdUO-{0yiK}8fpmb=mMf%pQyMnPLE++7HSYLz%fGOyNj83geSr_lv+xv2x zlk3qtZp#EnP`A>oW?FAJL>-1?&jn2d9D7qNPCNpdo?E3B zJb+z>>m4UJ9#(i?LfHvOm}te*@~81y`B9P^x18zQ+XFkvJ&{g|JQfe2q+zN8Nu<|+ z3uz-u&wJ2x)#BnJr=`3}Z_MSi?bZp#5!>J1YI!9r9$D+fN2|_*&xfzccX)iLrRCjZ z#NOaqs{T*z_qcLr_4au>e}uBCqx|vjEFr*Z+LQxK-Cn-d-LtU(=^|%|p}pF5gb*Pr zhX=GhFRPA&dgj+45g89H2$MXVl`cfv4N-N++h)cR=KFn7C$3`&wklHbFnk5j4w%R< zoM7M&A=2{TlG0IS7hE_X>g1}r6#~%4ETL&yBKezWRcYB?ZjszlIxlzOi!<2J1vs&_ zQNLYAozr-k;#Z&0kh$>eW)2U~0D&CH`ec2HnDYMH1Dl)8*&-eDDer5TtLyNw7`7eA zG^p*#D&JF{?U{gF2BfpV7RX6y^1mU9?RmFGmN;=ErX{xCv;JW~0|f9Im#^yftnqok z(2z{Ucn^dfH|rB+?W$*KOssh$8eU%gbZ8(6h3Mg1fG2sPtz{9?)IwlPQ{o3JJ92Cy+QA zne_AZGQ69wN4ZN2oMq0S27@ZW zl`037`Ti26@6Yvzo=XgK-0%2@gqZIP*mT(uX`?s4b?u2bntO~qr%#7m znh+fvQKC+EB3DyNNtfIG=)y-5H4zH1DS^r_d{@OXeAsf6(B>N1Aplu4P(Czl`&Ouu zGV(h(xGzC(KFRN&U)ZA86-g?NJb2d_soRkgIc%CdXBL?41q}!`;hiFoUVShsKkd?# zvv4jR2uk!39ifO)z!G4FIZdKz4ZPhHY&LFJzzGaAK*`y#()~+n zK`tJ2p6;(cEf+KEPG~>W@vn+uk)#1SNH0KOaVH>Zd@ZPK;KM&2nOlK&AW$w)E= zl5`F3FGk{Bm>|RhUZ^6(mv&*ia|fKRy6YiPGzPhQXG6KSxubrg+?(RsL^2ap=qNG= zh9((!&p%M6obN)E6gUeoEeu9eu*^1&Vsl@>$6M83s% z9}ZRzA617#7b$|zv5dLo`Pt(hZlW`yzFNFo>`EAu!&6wY`-3&TBgl}u!?E0fa3w3% z1~|^yL#b49`s0xF26>9_%{rI$)7tFWbV8i9c%oF#x3!(Crc!&(tPCYxmIezbDZZ|+ zT*zT{Yq{0^vj6sicB%5!BkXd6smUBhqc8T8yoibItntJk|B4iXc*dP9uIh9a9Si7V zV*$&=6v6s{%j3Ci&4BgiU0}&>3bZHXV_1h8E}jg?AyGVCwb0R|=aqZEn`Gi&^NpZE z^f%;a1W7cn$Df_BdOuaArSe1(F+`u9M14g`Y4Be;{PvHV2Vis1Wm6fCDRs4LX@Mo> zdgp;{;>w;%qt1UCPr_et3Ve{!Y$yX7-ANF7WMm6jP$Ci)?)`)uVOf!pSFpeINJ&U^ zOps8J#vjK;J)UaRsqz5yQa$2bqkT3;+NC literal 0 HcmV?d00001 diff --git a/node_modules/@actions/http-client/auth.d.ts b/node_modules/@actions/http-client/auth.d.ts new file mode 100644 index 00000000..1094189c --- /dev/null +++ b/node_modules/@actions/http-client/auth.d.ts @@ -0,0 +1,23 @@ +import ifm = require('./interfaces'); +export declare class BasicCredentialHandler implements ifm.IRequestHandler { + username: string; + password: string; + constructor(username: string, password: string); + prepareRequest(options: any): void; + canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; + handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; +} +export declare class BearerCredentialHandler implements ifm.IRequestHandler { + token: string; + constructor(token: string); + prepareRequest(options: any): void; + canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; + handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; +} +export declare class PersonalAccessTokenCredentialHandler implements ifm.IRequestHandler { + token: string; + constructor(token: string); + prepareRequest(options: any): void; + canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; + handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; +} diff --git a/node_modules/@actions/http-client/auth.js b/node_modules/@actions/http-client/auth.js new file mode 100644 index 00000000..98d22d66 --- /dev/null +++ b/node_modules/@actions/http-client/auth.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + options.headers['Authorization'] = 'Basic ' + Buffer.from(this.username + ':' + this.password).toString('base64'); + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +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) { + options.headers['Authorization'] = 'Bearer ' + this.token; + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +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) { + options.headers['Authorization'] = 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; diff --git a/node_modules/@actions/http-client/index.d.ts b/node_modules/@actions/http-client/index.d.ts new file mode 100644 index 00000000..ea3454dd --- /dev/null +++ b/node_modules/@actions/http-client/index.d.ts @@ -0,0 +1,100 @@ +/// +import http = require("http"); +import ifm = require('./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, + InternalServerError = 500, + NotImplemented = 501, + BadGateway = 502, + ServiceUnavailable = 503, + GatewayTimeout = 504 +} +/** + * 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 HttpClientResponse implements ifm.IHttpClientResponse { + 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.IRequestHandler[]; + requestOptions: ifm.IRequestOptions; + 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.IRequestHandler[], requestOptions?: ifm.IRequestOptions); + options(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; + get(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; + del(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; + post(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; + patch(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; + put(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; + head(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; + sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: ifm.IHeaders): 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, headers: ifm.IHeaders): 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.IRequestInfo, data: string | NodeJS.ReadableStream): Promise; + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: ifm.IHttpClientResponse) => 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 _getAgent; + private _performExponentialBackoff; +} diff --git a/node_modules/@actions/http-client/index.js b/node_modules/@actions/http-client/index.js new file mode 100644 index 00000000..631e16f7 --- /dev/null +++ b/node_modules/@actions/http-client/index.js @@ -0,0 +1,386 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const url = require("url"); +const http = require("http"); +const https = require("https"); +const pm = require("./proxy"); +let 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["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 = {})); +/** + * 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) { + let proxyUrl = pm.getProxyUrl(url.parse(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 HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return new Promise(async (resolve, reject) => { + 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) { + let parsedUrl = url.parse(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 this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + } + get(requestUrl, additionalHeaders) { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + } + del(requestUrl, additionalHeaders) { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + } + post(requestUrl, data, additionalHeaders) { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + } + patch(requestUrl, data, additionalHeaders) { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + } + put(requestUrl, data, additionalHeaders) { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + } + head(requestUrl, additionalHeaders) { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return this.request(verb, requestUrl, stream, additionalHeaders); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + async request(verb, requestUrl, data, headers) { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + let parsedUrl = url.parse(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + let maxTries = (this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + while (numTries < maxTries) { + response = await this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (let i = 0; i < this.handlers.length; i++) { + if (this.handlers[i].canHandleAuthentication(response)) { + authenticationHandler = this.handlers[i]; + 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 (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 + && this._allowRedirects + && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + let parsedRedirectUrl = url.parse(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. + await response.readBody(); + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = await this.requestRaw(info, data); + redirectsRemaining--; + } + if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + await response.readBody(); + await this._performExponentialBackoff(numTries); + } + } + 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 new Promise((resolve, reject) => { + let callbackForResult = function (err, res) { + if (err) { + reject(err); + } + resolve(res); + }; + this.requestRawWithCallback(info, data, callbackForResult); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + let socket; + if (typeof (data) === 'string') { + info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + let handleResult = (err, res) => { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + }; + let req = info.httpModule.request(info.options, (msg) => { + let res = new HttpClientResponse(msg); + handleResult(null, res); + }); + 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), null); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err, null); + }); + 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) { + let parsedUrl = url.parse(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) { + this.handlers.forEach((handler) => { + handler.prepareRequest(info.options); + }); + } + return info; + } + _mergeHeaders(headers) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + } + return lowercaseKeys(headers || {}); + } + _getAgent(parsedUrl) { + let agent; + let proxyUrl = pm.getProxyUrl(parsedUrl); + let 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; + } + if (useProxy) { + // If using proxy, need tunnel + if (!tunnel) { + tunnel = require('tunnel'); + } + const agentOptions = { + maxSockets: maxSockets, + keepAlive: this._keepAlive, + proxy: { + proxyAuth: proxyUrl.auth, + 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: 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) { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + } +} +exports.HttpClient = HttpClient; diff --git a/node_modules/@actions/http-client/interfaces.d.ts b/node_modules/@actions/http-client/interfaces.d.ts new file mode 100644 index 00000000..2e8822a0 --- /dev/null +++ b/node_modules/@actions/http-client/interfaces.d.ts @@ -0,0 +1,44 @@ +/// +import http = require("http"); +import url = require("url"); +export interface IHeaders { + [key: string]: any; +} +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 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 IRequestInfo { + options: http.RequestOptions; + parsedUrl: url.Url; + httpModule: any; +} +export interface IRequestOptions { + headers?: IHeaders; + socketTimeout?: number; + ignoreSslError?: boolean; + allowRedirects?: boolean; + allowRedirectDowngrade?: boolean; + maxRedirects?: number; + maxSockets?: number; + keepAlive?: boolean; + allowRetries?: boolean; + maxRetries?: number; +} diff --git a/node_modules/@actions/http-client/interfaces.js b/node_modules/@actions/http-client/interfaces.js new file mode 100644 index 00000000..04363ad2 --- /dev/null +++ b/node_modules/@actions/http-client/interfaces.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +; diff --git a/node_modules/@actions/http-client/package.json b/node_modules/@actions/http-client/package.json new file mode 100644 index 00000000..f7274814 --- /dev/null +++ b/node_modules/@actions/http-client/package.json @@ -0,0 +1,66 @@ +{ + "_args": [ + [ + "@actions/http-client@1.0.3", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@actions/http-client@1.0.3", + "_id": "@actions/http-client@1.0.3", + "_inBundle": false, + "_integrity": "sha512-wFwh1U4adB/Zsk4cc9kVqaBOHoknhp/pJQk+aWTocbAZWpIl4Zx/At83WFRLXvxB+5HVTWOACM6qjULMZfQSfw==", + "_location": "/@actions/http-client", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/http-client@1.0.3", + "name": "@actions/http-client", + "escapedName": "@actions%2fhttp-client", + "scope": "@actions", + "rawSpec": "1.0.3", + "saveSpec": null, + "fetchSpec": "1.0.3" + }, + "_requiredBy": [ + "/@actions/github" + ], + "_resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.3.tgz", + "_spec": "1.0.3", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "GitHub, Inc." + }, + "bugs": { + "url": "https://github.com/actions/http-client/issues" + }, + "dependencies": { + "tunnel": "0.0.6" + }, + "description": "Actions Http Client", + "devDependencies": { + "@types/jest": "^24.0.25", + "@types/node": "^12.12.24", + "jest": "^24.9.0", + "proxy": "^1.0.1", + "ts-jest": "^24.3.0", + "typescript": "^3.7.4" + }, + "homepage": "https://github.com/actions/http-client#readme", + "keywords": [ + "Actions", + "Http" + ], + "license": "MIT", + "main": "index.js", + "name": "@actions/http-client", + "repository": { + "type": "git", + "url": "git+https://github.com/actions/http-client.git" + }, + "scripts": { + "build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out", + "test": "jest" + }, + "version": "1.0.3" +} diff --git a/node_modules/@actions/http-client/proxy.d.ts b/node_modules/@actions/http-client/proxy.d.ts new file mode 100644 index 00000000..9995ea5d --- /dev/null +++ b/node_modules/@actions/http-client/proxy.d.ts @@ -0,0 +1,4 @@ +/// +import * as url from 'url'; +export declare function getProxyUrl(reqUrl: url.Url): url.Url | undefined; +export declare function checkBypass(reqUrl: url.Url): boolean; diff --git a/node_modules/@actions/http-client/proxy.js b/node_modules/@actions/http-client/proxy.js new file mode 100644 index 00000000..7233779e --- /dev/null +++ b/node_modules/@actions/http-client/proxy.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const url = require("url"); +function getProxyUrl(reqUrl) { + let usingSsl = reqUrl.protocol === 'https:'; + let proxyUrl; + if (checkBypass(reqUrl)) { + return proxyUrl; + } + let proxyVar; + if (usingSsl) { + proxyVar = process.env["https_proxy"] || + process.env["HTTPS_PROXY"]; + } + else { + proxyVar = process.env["http_proxy"] || + process.env["HTTP_PROXY"]; + } + if (proxyVar) { + proxyUrl = url.parse(proxyVar); + } + return proxyUrl; +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + let 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 + let upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (let 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; diff --git a/node_modules/@octokit/auth-token/LICENSE b/node_modules/@octokit/auth-token/LICENSE new file mode 100644 index 00000000..ef2c18ee --- /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 00000000..ff80003a --- /dev/null +++ b/node_modules/@octokit/auth-token/README.md @@ -0,0 +1,257 @@ +# 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://travis-ci.com/octokit/auth-token.js.svg?branch=master)](https://travis-ci.com/octokit/auth-token.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/auth-token.js.svg)](https://greenkeeper.io/) + +`@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 + + + + + + +
+Browsers + + +Load `@octokit/auth-token` directly from [cdn.pika.dev](https://cdn.pika.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("1234567890abcdef1234567890abcdef12345678"); +const authentication = await auth(); +// { +// type: 'token', +// token: '1234567890abcdef1234567890abcdef12345678', +// 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/) +- Installation access token ([GitHub App Installation](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)) +- [GITHUB_TOKEN provided to GitHub Actions](https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables) + +Examples + +```js +// Personal access token or OAuth access token +createTokenAuth("1234567890abcdef1234567890abcdef12345678"); + +// Installation access token or GitHub Action token +createTokenAuth("v1.d3d433526f780fbcc3129004e2731b3904ad0b86"); +``` + +## `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, or "installation" for installation access tokens (includes GITHUB_TOKEN provided to GitHub Actions) +
+ +## `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 = "1234567890abcdef1234567890abcdef12345678"; + +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 = "1234567890abcdef1234567890abcdef12345678"; + +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 = "1234567890abcdef1234567890abcdef12345678"; + +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 = "1234567890abcdef1234567890abcdef12345678"; + +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 00000000..1394a5da --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-node/index.js @@ -0,0 +1,49 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +async function auth(token) { + const tokenType = token.split(/\./).length === 3 ? "app" : /^v\d+\./.test(token) ? "installation" : "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 00000000..90abf897 --- /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":["export async function auth(token) {\n const tokenType = token.split(/\\./).length === 3\n ? \"app\"\n : /^v\\d+\\./.test(token)\n ? \"installation\"\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":["auth","token","tokenType","split","length","test","type","withAuthorizationPrefix","hook","request","route","parameters","endpoint","merge","headers","authorization","createTokenAuth","Error","replace","Object","assign","bind"],"mappings":";;;;AAAO,eAAeA,IAAf,CAAoBC,KAApB,EAA2B;QACxBC,SAAS,GAAGD,KAAK,CAACE,KAAN,CAAY,IAAZ,EAAkBC,MAAlB,KAA6B,CAA7B,GACZ,KADY,GAEZ,UAAUC,IAAV,CAAeJ,KAAf,IACI,cADJ,GAEI,OAJV;SAKO;IACHK,IAAI,EAAE,OADH;IAEHL,KAAK,EAAEA,KAFJ;IAGHC;GAHJ;;;ACNJ;;;;;AAKA,AAAO,SAASK,uBAAT,CAAiCN,KAAjC,EAAwC;MACvCA,KAAK,CAACE,KAAN,CAAY,IAAZ,EAAkBC,MAAlB,KAA6B,CAAjC,EAAoC;WACxB,UAASH,KAAM,EAAvB;;;SAEI,SAAQA,KAAM,EAAtB;;;ACRG,eAAeO,IAAf,CAAoBP,KAApB,EAA2BQ,OAA3B,EAAoCC,KAApC,EAA2CC,UAA3C,EAAuD;QACpDC,QAAQ,GAAGH,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuBH,KAAvB,EAA8BC,UAA9B,CAAjB;EACAC,QAAQ,CAACE,OAAT,CAAiBC,aAAjB,GAAiCR,uBAAuB,CAACN,KAAD,CAAxD;SACOQ,OAAO,CAACG,QAAD,CAAd;;;MCFSI,eAAe,GAAG,SAASA,eAAT,CAAyBf,KAAzB,EAAgC;MACvD,CAACA,KAAL,EAAY;UACF,IAAIgB,KAAJ,CAAU,0DAAV,CAAN;;;MAEA,OAAOhB,KAAP,KAAiB,QAArB,EAA+B;UACrB,IAAIgB,KAAJ,CAAU,uEAAV,CAAN;;;EAEJhB,KAAK,GAAGA,KAAK,CAACiB,OAAN,CAAc,oBAAd,EAAoC,EAApC,CAAR;SACOC,MAAM,CAACC,MAAP,CAAcpB,IAAI,CAACqB,IAAL,CAAU,IAAV,EAAgBpB,KAAhB,CAAd,EAAsC;IACzCO,IAAI,EAAEA,IAAI,CAACa,IAAL,CAAU,IAAV,EAAgBpB,KAAhB;GADH,CAAP;CARG;;;;"} \ 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 00000000..2d5005c2 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-src/auth.js @@ -0,0 +1,12 @@ +export async function auth(token) { + const tokenType = token.split(/\./).length === 3 + ? "app" + : /^v\d+\./.test(token) + ? "installation" + : "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 00000000..f8e47f0c --- /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 00000000..114fd455 --- /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 00000000..e69de29b 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 00000000..90358136 --- /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 00000000..dc418358 --- /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 00000000..21e4b6fc --- /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 00000000..59994293 --- /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 00000000..53a4ab11 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-types/types.d.ts @@ -0,0 +1,25 @@ +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 Authentication = OAuthTokenAuthentication | InstallationTokenAuthentication | AppAuthentication; 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 00000000..2e52c31d --- /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 00000000..c15ca122 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-web/index.js @@ -0,0 +1,46 @@ +async function auth(token) { + const tokenType = token.split(/\./).length === 3 + ? "app" + : /^v\d+\./.test(token) + ? "installation" + : "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 00000000..7814a3f5 --- /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":["export async function auth(token) {\n const tokenType = token.split(/\\./).length === 3\n ? \"app\"\n : /^v\\d+\\./.test(token)\n ? \"installation\"\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":"AAAO,eAAe,IAAI,CAAC,KAAK,EAAE;IAC9B,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;UAC1C,KAAK;UACL,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;cACjB,cAAc;cACd,OAAO,CAAC;IAClB,OAAO;QACH,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,KAAK;QACZ,SAAS;KACZ,CAAC;CACL;;ACXD;;;;;AAKA,AAAO,SAAS,uBAAuB,CAAC,KAAK,EAAE;IAC3C,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QAChC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;KAC5B;IACD,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;CAC3B;;ACTM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;IAC1D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC3D,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAChE,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC5B;;ACHW,MAAC,eAAe,GAAG,SAAS,eAAe,CAAC,KAAK,EAAE;IAC3D,IAAI,CAAC,KAAK,EAAE;QACR,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC/E;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;KAC5F;IACD,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;QACzC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;KAC/B,CAAC,CAAC;CACN;;;;"} \ 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 00000000..a7e72e62 --- /dev/null +++ b/node_modules/@octokit/auth-token/package.json @@ -0,0 +1,79 @@ +{ + "_args": [ + [ + "@octokit/auth-token@2.4.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@octokit/auth-token@2.4.0", + "_id": "@octokit/auth-token@2.4.0", + "_inBundle": false, + "_integrity": "sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg==", + "_location": "/@octokit/auth-token", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/auth-token@2.4.0", + "name": "@octokit/auth-token", + "escapedName": "@octokit%2fauth-token", + "scope": "@octokit", + "rawSpec": "2.4.0", + "saveSpec": null, + "fetchSpec": "2.4.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.0.tgz", + "_spec": "2.4.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/octokit/auth-token.js/issues" + }, + "dependencies": { + "@octokit/types": "^2.0.0" + }, + "description": "GitHub API token authentication for browsers and Node.js", + "devDependencies": { + "@octokit/request": "^5.3.0", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.7.0", + "@pika/plugin-build-web": "^0.7.0", + "@pika/plugin-ts-standard-pkg": "^0.7.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^24.0.13", + "fetch-mock": "^7.3.7", + "jest": "^24.8.0", + "semantic-release": "^15.13.12", + "ts-jest": "^24.0.2", + "typescript": "^3.5.1" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/auth-token.js#readme", + "keywords": [ + "github", + "octokit", + "authentication", + "api" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/auth-token", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/auth-token.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "2.4.0" +} diff --git a/node_modules/@octokit/endpoint/LICENSE b/node_modules/@octokit/endpoint/LICENSE new file mode 100644 index 00000000..af5366d0 --- /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 00000000..5ac84297 --- /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) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/endpoint.js.svg)](https://greenkeeper.io/) + +`@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()](#endpointroute-options-or-endpointoptions) + - [endpoint.defaults()](#endpointdefaults) + - [endpoint.DEFAULTS](#endpointdefaults-1) + - [endpoint.merge()](#endpointmergeroute-options-or-endpointmergeoptions) + - [endpoint.parse()](#endpointparse) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter--set-request-body-directly) + - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) +- [LICENSE](#license) + + + +## Usage + + + + + + +
+Browsers + +Load @octokit/endpoint directly from cdn.pika.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 00000000..9218ced3 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-node/index.js @@ -0,0 +1,379 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var isPlainObject = _interopDefault(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(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 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); + 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 isBinaryRequset = /application\/octet-stream/i.test(headers.accept); + + if (!isBinaryRequset) { + 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 = "5.5.1"; + +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 00000000..d84c1b7c --- /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/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","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\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 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=\" +\n parameters\n .q.split(\"+\")\n .map(encodeURIComponent)\n .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)\n .replace(/%5B/g, \"[\")\n .replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return (\"%\" +\n c\n .charCodeAt(0)\n .toString(16)\n .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 isBinaryRequset = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequset) {\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 = \"5.5.1\";\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","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","obj","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","undefined","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","isBinaryRequset","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;;;AAAO,SAASA,aAAT,CAAuBC,MAAvB,EAA+B;MAC9B,CAACA,MAAL,EAAa;WACF,EAAP;;;SAEGC,MAAM,CAACC,IAAP,CAAYF,MAAZ,EAAoBG,MAApB,CAA2B,CAACC,MAAD,EAASC,GAAT,KAAiB;IAC/CD,MAAM,CAACC,GAAG,CAACC,WAAJ,EAAD,CAAN,GAA4BN,MAAM,CAACK,GAAD,CAAlC;WACOD,MAAP;GAFG,EAGJ,EAHI,CAAP;;;ACHG,SAASG,SAAT,CAAmBC,QAAnB,EAA6BC,OAA7B,EAAsC;QACnCC,MAAM,GAAGT,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBH,QAAlB,CAAf;EACAP,MAAM,CAACC,IAAP,CAAYO,OAAZ,EAAqBG,OAArB,CAA6BP,GAAG,IAAI;QAC5BQ,aAAa,CAACJ,OAAO,CAACJ,GAAD,CAAR,CAAjB,EAAiC;UACzB,EAAEA,GAAG,IAAIG,QAAT,CAAJ,EACIP,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;SAAGL,GAAD,GAAOI,OAAO,CAACJ,GAAD;OAAtC,EADJ,KAGIK,MAAM,CAACL,GAAD,CAAN,GAAcE,SAAS,CAACC,QAAQ,CAACH,GAAD,CAAT,EAAgBI,OAAO,CAACJ,GAAD,CAAvB,CAAvB;KAJR,MAMK;MACDJ,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;SAAGL,GAAD,GAAOI,OAAO,CAACJ,GAAD;OAAtC;;GARR;SAWOK,MAAP;;;ACZG,SAASI,KAAT,CAAeN,QAAf,EAAyBO,KAAzB,EAAgCN,OAAhC,EAAyC;MACxC,OAAOM,KAAP,KAAiB,QAArB,EAA+B;QACvB,CAACC,MAAD,EAASC,GAAT,IAAgBF,KAAK,CAACG,KAAN,CAAY,GAAZ,CAApB;IACAT,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAcM,GAAG,GAAG;MAAED,MAAF;MAAUC;KAAb,GAAqB;MAAEA,GAAG,EAAED;KAA7C,EAAuDP,OAAvD,CAAV;GAFJ,MAIK;IACDA,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBI,KAAlB,CAAV;GANwC;;;EAS5CN,OAAO,CAACU,OAAR,GAAkBpB,aAAa,CAACU,OAAO,CAACU,OAAT,CAA/B;QACMC,aAAa,GAAGb,SAAS,CAACC,QAAQ,IAAI,EAAb,EAAiBC,OAAjB,CAA/B,CAV4C;;MAYxCD,QAAQ,IAAIA,QAAQ,CAACa,SAAT,CAAmBC,QAAnB,CAA4BC,MAA5C,EAAoD;IAChDH,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCd,QAAQ,CAACa,SAAT,CAAmBC,QAAnB,CAC9BE,MAD8B,CACvBC,OAAO,IAAI,CAACL,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCI,QAAjC,CAA0CD,OAA1C,CADW,EAE9BE,MAF8B,CAEvBP,aAAa,CAACC,SAAd,CAAwBC,QAFD,CAAnC;;;EAIJF,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;SACOT,aAAP;;;ACpBG,SAASU,kBAAT,CAA4Bb,GAA5B,EAAiCc,UAAjC,EAA6C;QAC1CC,SAAS,GAAG,KAAKC,IAAL,CAAUhB,GAAV,IAAiB,GAAjB,GAAuB,GAAzC;QACMiB,KAAK,GAAGjC,MAAM,CAACC,IAAP,CAAY6B,UAAZ,CAAd;;MACIG,KAAK,CAACX,MAAN,KAAiB,CAArB,EAAwB;WACbN,GAAP;;;SAEIA,GAAG,GACPe,SADI,GAEJE,KAAK,CACAN,GADL,CACSO,IAAI,IAAI;QACTA,IAAI,KAAK,GAAb,EAAkB;aACN,OACJJ,UAAU,CACLK,CADL,CACOlB,KADP,CACa,GADb,EAEKU,GAFL,CAESS,kBAFT,EAGKC,IAHL,CAGU,GAHV,CADJ;;;WAMI,GAAEH,IAAK,IAAGE,kBAAkB,CAACN,UAAU,CAACI,IAAD,CAAX,CAAmB,EAAvD;GATJ,EAWKG,IAXL,CAWU,GAXV,CAFJ;;;ACNJ,MAAMC,gBAAgB,GAAG,YAAzB;;AACA,SAASC,cAAT,CAAwBC,YAAxB,EAAsC;SAC3BA,YAAY,CAACZ,OAAb,CAAqB,YAArB,EAAmC,EAAnC,EAAuCX,KAAvC,CAA6C,GAA7C,CAAP;;;AAEJ,AAAO,SAASwB,uBAAT,CAAiCzB,GAAjC,EAAsC;QACnC0B,OAAO,GAAG1B,GAAG,CAAC2B,KAAJ,CAAUL,gBAAV,CAAhB;;MACI,CAACI,OAAL,EAAc;WACH,EAAP;;;SAEGA,OAAO,CAACf,GAAR,CAAYY,cAAZ,EAA4BrC,MAA5B,CAAmC,CAAC0C,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAAClB,MAAF,CAASmB,CAAT,CAA7C,EAA0D,EAA1D,CAAP;;;ACTG,SAASC,IAAT,CAAc/C,MAAd,EAAsBgD,UAAtB,EAAkC;SAC9B/C,MAAM,CAACC,IAAP,CAAYF,MAAZ,EACFwB,MADE,CACKyB,MAAM,IAAI,CAACD,UAAU,CAACtB,QAAX,CAAoBuB,MAApB,CADhB,EAEF9C,MAFE,CAEK,CAAC+C,GAAD,EAAM7C,GAAN,KAAc;IACtB6C,GAAG,CAAC7C,GAAD,CAAH,GAAWL,MAAM,CAACK,GAAD,CAAjB;WACO6C,GAAP;GAJG,EAKJ,EALI,CAAP;;;ACDJ;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAASC,cAAT,CAAwBC,GAAxB,EAA6B;SAClBA,GAAG,CACLlC,KADE,CACI,oBADJ,EAEFU,GAFE,CAEE,UAAUyB,IAAV,EAAgB;QACjB,CAAC,eAAepB,IAAf,CAAoBoB,IAApB,CAAL,EAAgC;MAC5BA,IAAI,GAAGC,SAAS,CAACD,IAAD,CAAT,CACFxB,OADE,CACM,MADN,EACc,GADd,EAEFA,OAFE,CAEM,MAFN,EAEc,GAFd,CAAP;;;WAIGwB,IAAP;GARG,EAUFf,IAVE,CAUG,EAVH,CAAP;;;AAYJ,SAASiB,gBAAT,CAA0BH,GAA1B,EAA+B;SACpBf,kBAAkB,CAACe,GAAD,CAAlB,CAAwBvB,OAAxB,CAAgC,UAAhC,EAA4C,UAAU2B,CAAV,EAAa;WACpD,MACJA,CAAC,CACIC,UADL,CACgB,CADhB,EAEKC,QAFL,CAEc,EAFd,EAGKC,WAHL,EADJ;GADG,CAAP;;;AAQJ,SAASC,WAAT,CAAqBC,QAArB,EAA+BC,KAA/B,EAAsCzD,GAAtC,EAA2C;EACvCyD,KAAK,GACDD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,GACMV,cAAc,CAACW,KAAD,CADpB,GAEMP,gBAAgB,CAACO,KAAD,CAH1B;;MAIIzD,GAAJ,EAAS;WACEkD,gBAAgB,CAAClD,GAAD,CAAhB,GAAwB,GAAxB,GAA8ByD,KAArC;GADJ,MAGK;WACMA,KAAP;;;;AAGR,SAASC,SAAT,CAAmBD,KAAnB,EAA0B;SACfA,KAAK,KAAKE,SAAV,IAAuBF,KAAK,KAAK,IAAxC;;;AAEJ,SAASG,aAAT,CAAuBJ,QAAvB,EAAiC;SACtBA,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,IAAwCA,QAAQ,KAAK,GAA5D;;;AAEJ,SAASK,SAAT,CAAmBC,OAAnB,EAA4BN,QAA5B,EAAsCxD,GAAtC,EAA2C+D,QAA3C,EAAqD;MAC7CN,KAAK,GAAGK,OAAO,CAAC9D,GAAD,CAAnB;MAA0BK,MAAM,GAAG,EAAnC;;MACIqD,SAAS,CAACD,KAAD,CAAT,IAAoBA,KAAK,KAAK,EAAlC,EAAsC;QAC9B,OAAOA,KAAP,KAAiB,QAAjB,IACA,OAAOA,KAAP,KAAiB,QADjB,IAEA,OAAOA,KAAP,KAAiB,SAFrB,EAEgC;MAC5BA,KAAK,GAAGA,KAAK,CAACJ,QAAN,EAAR;;UACIU,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;QAC9BN,KAAK,GAAGA,KAAK,CAACO,SAAN,CAAgB,CAAhB,EAAmBC,QAAQ,CAACF,QAAD,EAAW,EAAX,CAA3B,CAAR;;;MAEJ1D,MAAM,CAAC6D,IAAP,CAAYX,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBG,aAAa,CAACJ,QAAD,CAAb,GAA0BxD,GAA1B,GAAgC,EAAlD,CAAvB;KAPJ,MASK;UACG+D,QAAQ,KAAK,GAAjB,EAAsB;YACdI,KAAK,CAACC,OAAN,CAAcX,KAAd,CAAJ,EAA0B;UACtBA,KAAK,CAACtC,MAAN,CAAauC,SAAb,EAAwBnD,OAAxB,CAAgC,UAAUkD,KAAV,EAAiB;YAC7CpD,MAAM,CAAC6D,IAAP,CAAYX,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBG,aAAa,CAACJ,QAAD,CAAb,GAA0BxD,GAA1B,GAAgC,EAAlD,CAAvB;WADJ;SADJ,MAKK;UACDJ,MAAM,CAACC,IAAP,CAAY4D,KAAZ,EAAmBlD,OAAnB,CAA2B,UAAU8D,CAAV,EAAa;gBAChCX,SAAS,CAACD,KAAK,CAACY,CAAD,CAAN,CAAb,EAAyB;cACrBhE,MAAM,CAAC6D,IAAP,CAAYX,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACY,CAAD,CAAhB,EAAqBA,CAArB,CAAvB;;WAFR;;OAPR,MAcK;cACKC,GAAG,GAAG,EAAZ;;YACIH,KAAK,CAACC,OAAN,CAAcX,KAAd,CAAJ,EAA0B;UACtBA,KAAK,CAACtC,MAAN,CAAauC,SAAb,EAAwBnD,OAAxB,CAAgC,UAAUkD,KAAV,EAAiB;YAC7Ca,GAAG,CAACJ,IAAJ,CAASX,WAAW,CAACC,QAAD,EAAWC,KAAX,CAApB;WADJ;SADJ,MAKK;UACD7D,MAAM,CAACC,IAAP,CAAY4D,KAAZ,EAAmBlD,OAAnB,CAA2B,UAAU8D,CAAV,EAAa;gBAChCX,SAAS,CAACD,KAAK,CAACY,CAAD,CAAN,CAAb,EAAyB;cACrBC,GAAG,CAACJ,IAAJ,CAAShB,gBAAgB,CAACmB,CAAD,CAAzB;cACAC,GAAG,CAACJ,IAAJ,CAASX,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACY,CAAD,CAAL,CAAShB,QAAT,EAAX,CAApB;;WAHR;;;YAOAO,aAAa,CAACJ,QAAD,CAAjB,EAA6B;UACzBnD,MAAM,CAAC6D,IAAP,CAAYhB,gBAAgB,CAAClD,GAAD,CAAhB,GAAwB,GAAxB,GAA8BsE,GAAG,CAACrC,IAAJ,CAAS,GAAT,CAA1C;SADJ,MAGK,IAAIqC,GAAG,CAACpD,MAAJ,KAAe,CAAnB,EAAsB;UACvBb,MAAM,CAAC6D,IAAP,CAAYI,GAAG,CAACrC,IAAJ,CAAS,GAAT,CAAZ;;;;GA5ChB,MAiDK;QACGuB,QAAQ,KAAK,GAAjB,EAAsB;UACdE,SAAS,CAACD,KAAD,CAAb,EAAsB;QAClBpD,MAAM,CAAC6D,IAAP,CAAYhB,gBAAgB,CAAClD,GAAD,CAA5B;;KAFR,MAKK,IAAIyD,KAAK,KAAK,EAAV,KAAiBD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAlD,CAAJ,EAA4D;MAC7DnD,MAAM,CAAC6D,IAAP,CAAYhB,gBAAgB,CAAClD,GAAD,CAAhB,GAAwB,GAApC;KADC,MAGA,IAAIyD,KAAK,KAAK,EAAd,EAAkB;MACnBpD,MAAM,CAAC6D,IAAP,CAAY,EAAZ;;;;SAGD7D,MAAP;;;AAEJ,AAAO,SAASkE,QAAT,CAAkBC,QAAlB,EAA4B;SACxB;IACHC,MAAM,EAAEA,MAAM,CAACC,IAAP,CAAY,IAAZ,EAAkBF,QAAlB;GADZ;;;AAIJ,SAASC,MAAT,CAAgBD,QAAhB,EAA0BV,OAA1B,EAAmC;MAC3Ba,SAAS,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,GAA/B,CAAhB;SACOH,QAAQ,CAAChD,OAAT,CAAiB,4BAAjB,EAA+C,UAAUoD,CAAV,EAAaC,UAAb,EAAyBC,OAAzB,EAAkC;QAChFD,UAAJ,EAAgB;UACRrB,QAAQ,GAAG,EAAf;YACMuB,MAAM,GAAG,EAAf;;UACIJ,SAAS,CAACK,OAAV,CAAkBH,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAlB,MAA4C,CAAC,CAAjD,EAAoD;QAChDzB,QAAQ,GAAGqB,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAX;QACAJ,UAAU,GAAGA,UAAU,CAACK,MAAX,CAAkB,CAAlB,CAAb;;;MAEJL,UAAU,CAAChE,KAAX,CAAiB,IAAjB,EAAuBN,OAAvB,CAA+B,UAAU4E,QAAV,EAAoB;YAC3Cb,GAAG,GAAG,4BAA4Bc,IAA5B,CAAiCD,QAAjC,CAAV;QACAJ,MAAM,CAACb,IAAP,CAAYL,SAAS,CAACC,OAAD,EAAUN,QAAV,EAAoBc,GAAG,CAAC,CAAD,CAAvB,EAA4BA,GAAG,CAAC,CAAD,CAAH,IAAUA,GAAG,CAAC,CAAD,CAAzC,CAArB;OAFJ;;UAIId,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;YAC1B7B,SAAS,GAAG,GAAhB;;YACI6B,QAAQ,KAAK,GAAjB,EAAsB;UAClB7B,SAAS,GAAG,GAAZ;SADJ,MAGK,IAAI6B,QAAQ,KAAK,GAAjB,EAAsB;UACvB7B,SAAS,GAAG6B,QAAZ;;;eAEG,CAACuB,MAAM,CAAC7D,MAAP,KAAkB,CAAlB,GAAsBsC,QAAtB,GAAiC,EAAlC,IAAwCuB,MAAM,CAAC9C,IAAP,CAAYN,SAAZ,CAA/C;OARJ,MAUK;eACMoD,MAAM,CAAC9C,IAAP,CAAY,GAAZ,CAAP;;KAtBR,MAyBK;aACMa,cAAc,CAACgC,OAAD,CAArB;;GA3BD,CAAP;;;ACvIG,SAASO,KAAT,CAAejF,OAAf,EAAwB;;MAEvBO,MAAM,GAAGP,OAAO,CAACO,MAAR,CAAe2C,WAAf,EAAb,CAF2B;;MAIvB1C,GAAG,GAAG,CAACR,OAAO,CAACQ,GAAR,IAAe,GAAhB,EAAqBY,OAArB,CAA6B,cAA7B,EAA6C,OAA7C,CAAV;MACIV,OAAO,GAAGlB,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBF,OAAO,CAACU,OAA1B,CAAd;MACIwE,IAAJ;MACI5D,UAAU,GAAGgB,IAAI,CAACtC,OAAD,EAAU,CAC3B,QAD2B,EAE3B,SAF2B,EAG3B,KAH2B,EAI3B,SAJ2B,EAK3B,SAL2B,EAM3B,WAN2B,CAAV,CAArB,CAP2B;;QAgBrBmF,gBAAgB,GAAGlD,uBAAuB,CAACzB,GAAD,CAAhD;EACAA,GAAG,GAAG2D,QAAQ,CAAC3D,GAAD,CAAR,CAAc6D,MAAd,CAAqB/C,UAArB,CAAN;;MACI,CAAC,QAAQE,IAAR,CAAahB,GAAb,CAAL,EAAwB;IACpBA,GAAG,GAAGR,OAAO,CAACoF,OAAR,GAAkB5E,GAAxB;;;QAEE6E,iBAAiB,GAAG7F,MAAM,CAACC,IAAP,CAAYO,OAAZ,EACrBe,MADqB,CACdyB,MAAM,IAAI2C,gBAAgB,CAAClE,QAAjB,CAA0BuB,MAA1B,CADI,EAErBtB,MAFqB,CAEd,SAFc,CAA1B;QAGMoE,mBAAmB,GAAGhD,IAAI,CAAChB,UAAD,EAAa+D,iBAAb,CAAhC;QACME,eAAe,GAAG,6BAA6B/D,IAA7B,CAAkCd,OAAO,CAAC8E,MAA1C,CAAxB;;MACI,CAACD,eAAL,EAAsB;QACdvF,OAAO,CAACY,SAAR,CAAkB6E,MAAtB,EAA8B;;MAE1B/E,OAAO,CAAC8E,MAAR,GAAiB9E,OAAO,CAAC8E,MAAR,CACZ/E,KADY,CACN,GADM,EAEZU,GAFY,CAERH,OAAO,IAAIA,OAAO,CAACI,OAAR,CAAgB,kDAAhB,EAAqE,uBAAsBpB,OAAO,CAACY,SAAR,CAAkB6E,MAAO,EAApH,CAFH,EAGZ5D,IAHY,CAGP,GAHO,CAAjB;;;QAKA7B,OAAO,CAACY,SAAR,CAAkBC,QAAlB,CAA2BC,MAA/B,EAAuC;YAC7B4E,wBAAwB,GAAGhF,OAAO,CAAC8E,MAAR,CAAerD,KAAf,CAAqB,qBAArB,KAA+C,EAAhF;MACAzB,OAAO,CAAC8E,MAAR,GAAiBE,wBAAwB,CACpCxE,MADY,CACLlB,OAAO,CAACY,SAAR,CAAkBC,QADb,EAEZM,GAFY,CAERH,OAAO,IAAI;cACVyE,MAAM,GAAGzF,OAAO,CAACY,SAAR,CAAkB6E,MAAlB,GACR,IAAGzF,OAAO,CAACY,SAAR,CAAkB6E,MAAO,EADpB,GAET,OAFN;eAGQ,0BAAyBzE,OAAQ,WAAUyE,MAAO,EAA1D;OANa,EAQZ5D,IARY,CAQP,GARO,CAAjB;;GApCmB;;;;MAiDvB,CAAC,KAAD,EAAQ,MAAR,EAAgBZ,QAAhB,CAAyBV,MAAzB,CAAJ,EAAsC;IAClCC,GAAG,GAAGa,kBAAkB,CAACb,GAAD,EAAM8E,mBAAN,CAAxB;GADJ,MAGK;QACG,UAAUA,mBAAd,EAAmC;MAC/BJ,IAAI,GAAGI,mBAAmB,CAACK,IAA3B;KADJ,MAGK;UACGnG,MAAM,CAACC,IAAP,CAAY6F,mBAAZ,EAAiCxE,MAArC,EAA6C;QACzCoE,IAAI,GAAGI,mBAAP;OADJ,MAGK;QACD5E,OAAO,CAAC,gBAAD,CAAP,GAA4B,CAA5B;;;GA7De;;;MAkEvB,CAACA,OAAO,CAAC,cAAD,CAAR,IAA4B,OAAOwE,IAAP,KAAgB,WAAhD,EAA6D;IACzDxE,OAAO,CAAC,cAAD,CAAP,GAA0B,iCAA1B;GAnEuB;;;;MAuEvB,CAAC,OAAD,EAAU,KAAV,EAAiBO,QAAjB,CAA0BV,MAA1B,KAAqC,OAAO2E,IAAP,KAAgB,WAAzD,EAAsE;IAClEA,IAAI,GAAG,EAAP;GAxEuB;;;SA2EpB1F,MAAM,CAACU,MAAP,CAAc;IAAEK,MAAF;IAAUC,GAAV;IAAeE;GAA7B,EAAwC,OAAOwE,IAAP,KAAgB,WAAhB,GAA8B;IAAEA;GAAhC,GAAyC,IAAjF,EAAuFlF,OAAO,CAAC4F,OAAR,GAAkB;IAAEA,OAAO,EAAE5F,OAAO,CAAC4F;GAArC,GAAiD,IAAxI,CAAP;;;AC7EG,SAASC,oBAAT,CAA8B9F,QAA9B,EAAwCO,KAAxC,EAA+CN,OAA/C,EAAwD;SACpDiF,KAAK,CAAC5E,KAAK,CAACN,QAAD,EAAWO,KAAX,EAAkBN,OAAlB,CAAN,CAAZ;;;ACAG,SAAS8F,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;QAC7CC,QAAQ,GAAG5F,KAAK,CAAC0F,WAAD,EAAcC,WAAd,CAAtB;QACME,QAAQ,GAAGL,oBAAoB,CAACvB,IAArB,CAA0B,IAA1B,EAAgC2B,QAAhC,CAAjB;SACOzG,MAAM,CAACU,MAAP,CAAcgG,QAAd,EAAwB;IAC3BD,QAD2B;IAE3BlG,QAAQ,EAAE+F,YAAY,CAACxB,IAAb,CAAkB,IAAlB,EAAwB2B,QAAxB,CAFiB;IAG3B5F,KAAK,EAAEA,KAAK,CAACiE,IAAN,CAAW,IAAX,EAAiB2B,QAAjB,CAHoB;IAI3BhB;GAJG,CAAP;;;ACNG,MAAMkB,OAAO,GAAG,mBAAhB;;ACEP,MAAMC,SAAS,GAAI,uBAAsBD,OAAQ,IAAGE,+BAAY,EAAG,EAAnE;;;AAGA,AAAO,MAAMJ,QAAQ,GAAG;EACpB1F,MAAM,EAAE,KADY;EAEpB6E,OAAO,EAAE,wBAFW;EAGpB1E,OAAO,EAAE;IACL8E,MAAM,EAAE,gCADH;kBAESY;GALE;EAOpBxF,SAAS,EAAE;IACP6E,MAAM,EAAE,EADD;IAEP5E,QAAQ,EAAE;;CATX;;MCHMqF,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 00000000..e1e53fbc --- /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 00000000..5763758f --- /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 00000000..599917f9 --- /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 00000000..a209ffa1 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/merge.js @@ -0,0 +1,22 @@ +import { lowercaseKeys } from "./util/lowercase-keys"; +import { mergeDeep } from "./util/merge-deep"; +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); + 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 00000000..ca68ca9f --- /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 isBinaryRequset = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequset) { + 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 00000000..a78812f7 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js @@ -0,0 +1,21 @@ +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 00000000..3e75db28 --- /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 00000000..07806425 --- /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 00000000..d1c5402d --- /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 00000000..7e1aa6b4 --- /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/url-template.js b/node_modules/@octokit/endpoint/dist-src/util/url-template.js new file mode 100644 index 00000000..f6d9885e --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/url-template.js @@ -0,0 +1,170 @@ +// 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 00000000..ef913979 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "5.5.1"; 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 00000000..9a1c886a --- /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 00000000..30fcd203 --- /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 00000000..ff39e5e7 --- /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 00000000..17be8553 --- /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 00000000..b75a15ec --- /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 00000000..fbe21440 --- /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 00000000..4b192ac4 --- /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 00000000..93586d4d --- /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 00000000..1daf3073 --- /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 00000000..914411cf --- /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 00000000..06927d6b --- /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/url-template.d.ts b/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts new file mode 100644 index 00000000..5d967cab --- /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 00000000..809d28a7 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "5.5.1"; 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 00000000..6f5afd1e --- /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 00000000..a327238b --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-web/index.js @@ -0,0 +1,379 @@ +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 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); + 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 isBinaryRequset = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequset) { + 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 = "5.5.1"; + +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 00000000..68900096 --- /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/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","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\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 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=\" +\n parameters\n .q.split(\"+\")\n .map(encodeURIComponent)\n .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)\n .replace(/%5B/g, \"[\")\n .replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return (\"%\" +\n c\n .charCodeAt(0)\n .toString(16)\n .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 isBinaryRequset = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequset) {\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 = \"5.5.1\";\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;IAClC,IAAI,CAAC,MAAM,EAAE;QACT,OAAO,EAAE,CAAC;KACb;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;QAC/C,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,MAAM,CAAC;KACjB,EAAE,EAAE,CAAC,CAAC;CACV;;ACPM,SAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;IACzC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC3C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI;QAChC,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;YAC7B,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC;gBAClB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;gBAE/C,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;SAC5D;aACI;YACD,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;SAClD;KACJ,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;CACjB;;ACbM,SAAS,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;KAC7E;SACI;QACD,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;KACtC;;IAED,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;;IAEzD,IAAI,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;QAChD,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;aACzD,MAAM,CAAC,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;aACtE,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;KACjD;IACD,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;IACtH,OAAO,aAAa,CAAC;CACxB;;ACrBM,SAAS,kBAAkB,CAAC,GAAG,EAAE,UAAU,EAAE;IAChD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;IAC7C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC;KACd;IACD,QAAQ,GAAG;QACP,SAAS;QACT,KAAK;aACA,GAAG,CAAC,IAAI,IAAI;YACb,IAAI,IAAI,KAAK,GAAG,EAAE;gBACd,QAAQ,IAAI;oBACR,UAAU;yBACL,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;yBACZ,GAAG,CAAC,kBAAkB,CAAC;yBACvB,IAAI,CAAC,GAAG,CAAC,EAAE;aACvB;YACD,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;SAC5D,CAAC;aACG,IAAI,CAAC,GAAG,CAAC,EAAE;CACvB;;ACpBD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AACtC,SAAS,cAAc,CAAC,YAAY,EAAE;IAClC,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;CAC5D;AACD,AAAO,SAAS,uBAAuB,CAAC,GAAG,EAAE;IACzC,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC5C,IAAI,CAAC,OAAO,EAAE;QACV,OAAO,EAAE,CAAC;KACb;IACD,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;CACxE;;ACVM,SAAS,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;SACrB,MAAM,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SAC9C,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;QACtB,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QACvB,OAAO,GAAG,CAAC;KACd,EAAE,EAAE,CAAC,CAAC;CACV;;ACPD;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAS,cAAc,CAAC,GAAG,EAAE;IACzB,OAAO,GAAG;SACL,KAAK,CAAC,oBAAoB,CAAC;SAC3B,GAAG,CAAC,UAAU,IAAI,EAAE;QACrB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC5B,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;iBACjB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;iBACpB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC;KACf,CAAC;SACG,IAAI,CAAC,EAAE,CAAC,CAAC;CACjB;AACD,SAAS,gBAAgB,CAAC,GAAG,EAAE;IAC3B,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;QAC5D,QAAQ,GAAG;YACP,CAAC;iBACI,UAAU,CAAC,CAAC,CAAC;iBACb,QAAQ,CAAC,EAAE,CAAC;iBACZ,WAAW,EAAE,EAAE;KAC3B,CAAC,CAAC;CACN;AACD,SAAS,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;IACvC,KAAK;QACD,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG;cAC9B,cAAc,CAAC,KAAK,CAAC;cACrB,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,GAAG,EAAE;QACL,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;KAC9C;SACI;QACD,OAAO,KAAK,CAAC;KAChB;CACJ;AACD,SAAS,SAAS,CAAC,KAAK,EAAE;IACtB,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;CAChD;AACD,SAAS,aAAa,CAAC,QAAQ,EAAE;IAC7B,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;CACnE;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;IACjD,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;IACtC,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;QAClC,IAAI,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,SAAS,EAAE;YAC5B,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzB,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;gBAC9B,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;aACtD;YACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;SACjF;aACI;YACD,IAAI,QAAQ,KAAK,GAAG,EAAE;gBAClB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACtB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;wBAC7C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;qBACjF,CAAC,CAAC;iBACN;qBACI;oBACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;wBACpC,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;4BACrB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;yBACnD;qBACJ,CAAC,CAAC;iBACN;aACJ;iBACI;gBACD,MAAM,GAAG,GAAG,EAAE,CAAC;gBACf,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACtB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;wBAC7C,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;qBAC1C,CAAC,CAAC;iBACN;qBACI;oBACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;wBACpC,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;4BACrB,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;4BAC9B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;yBACxD;qBACJ,CAAC,CAAC;iBACN;gBACD,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;oBACzB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC5D;qBACI,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC9B;aACJ;SACJ;KACJ;SACI;QACD,IAAI,QAAQ,KAAK,GAAG,EAAE;YAClB,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;gBAClB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;aACtC;SACJ;aACI,IAAI,KAAK,KAAK,EAAE,KAAK,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC,EAAE;YAC7D,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;SAC5C;aACI,IAAI,KAAK,KAAK,EAAE,EAAE;YACnB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACnB;KACJ;IACD,OAAO,MAAM,CAAC;CACjB;AACD,AAAO,SAAS,QAAQ,CAAC,QAAQ,EAAE;IAC/B,OAAO;QACH,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;KACtC,CAAC;CACL;AACD,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;IAC/B,IAAI,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACpD,OAAO,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE;QACpF,IAAI,UAAU,EAAE;YACZ,IAAI,QAAQ,GAAG,EAAE,CAAC;YAClB,MAAM,MAAM,GAAG,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;gBAChD,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAChC,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aACrC;YACD,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ,EAAE;gBAC/C,IAAI,GAAG,GAAG,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACrD,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;aACvE,CAAC,CAAC;YACH,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;gBAC9B,IAAI,SAAS,GAAG,GAAG,CAAC;gBACpB,IAAI,QAAQ,KAAK,GAAG,EAAE;oBAClB,SAAS,GAAG,GAAG,CAAC;iBACnB;qBACI,IAAI,QAAQ,KAAK,GAAG,EAAE;oBACvB,SAAS,GAAG,QAAQ,CAAC;iBACxB;gBACD,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aACzE;iBACI;gBACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAC3B;SACJ;aACI;YACD,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;SAClC;KACJ,CAAC,CAAC;CACN;;ACrKM,SAAS,KAAK,CAAC,OAAO,EAAE;;IAE3B,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;;IAE1C,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IAChE,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC;IACT,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE;QAC3B,QAAQ;QACR,SAAS;QACT,KAAK;QACL,SAAS;QACT,SAAS;QACT,WAAW;KACd,CAAC,CAAC;;IAEH,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtD,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACvC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACpB,GAAG,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;KAC/B;IACD,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;SACzC,MAAM,CAAC,MAAM,IAAI,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACnD,MAAM,CAAC,SAAS,CAAC,CAAC;IACvB,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAChE,MAAM,eAAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1E,IAAI,CAAC,eAAe,EAAE;QAClB,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;;YAE1B,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;iBAC1B,KAAK,CAAC,GAAG,CAAC;iBACV,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,kDAAkD,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;iBACtI,IAAI,CAAC,GAAG,CAAC,CAAC;SAClB;QACD,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;YACnC,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;YACnF,OAAO,CAAC,MAAM,GAAG,wBAAwB;iBACpC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;iBAClC,GAAG,CAAC,OAAO,IAAI;gBAChB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM;sBACjC,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;sBAC9B,OAAO,CAAC;gBACd,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;aAC/D,CAAC;iBACG,IAAI,CAAC,GAAG,CAAC,CAAC;SAClB;KACJ;;;IAGD,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAClC,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;KACtD;SACI;QACD,IAAI,MAAM,IAAI,mBAAmB,EAAE;YAC/B,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;SACnC;aACI;YACD,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;gBACzC,IAAI,GAAG,mBAAmB,CAAC;aAC9B;iBACI;gBACD,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;aACjC;SACJ;KACJ;;IAED,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QACzD,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;KAC/D;;;IAGD,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QAClE,IAAI,GAAG,EAAE,CAAC;KACb;;IAED,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;CACxJ;;AC9EM,SAAS,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;IAC3D,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;CACjD;;ACDM,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;IACnD,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;QAC3B,QAAQ;QACR,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;QAC3C,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;QACjC,KAAK;KACR,CAAC,CAAC;CACN;;ACZM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACE3C,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;;;AAGrE,AAAO,MAAM,QAAQ,GAAG;IACpB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE;QACL,MAAM,EAAE,gCAAgC;QACxC,YAAY,EAAE,SAAS;KAC1B;IACD,SAAS,EAAE;QACP,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,EAAE;KACf;CACJ,CAAC;;ACdU,MAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/LICENSE b/node_modules/@octokit/endpoint/node_modules/is-plain-object/LICENSE new file mode 100644 index 00000000..3f2eca18 --- /dev/null +++ b/node_modules/@octokit/endpoint/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/@octokit/endpoint/node_modules/is-plain-object/README.md b/node_modules/@octokit/endpoint/node_modules/is-plain-object/README.md new file mode 100644 index 00000000..60b7b591 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/README.md @@ -0,0 +1,119 @@ +# 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. + +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 + +```js +import isPlainObject from 'is-plain-object'; +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> 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._ \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.cjs.js b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.cjs.js new file mode 100644 index 00000000..d7dda951 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.cjs.js @@ -0,0 +1,48 @@ +'use strict'; + +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} + +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(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; +} + +module.exports = isPlainObject; diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.d.ts b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.d.ts new file mode 100644 index 00000000..fd131f01 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,3 @@ +declare function isPlainObject(o: any): boolean; + +export default isPlainObject; diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.js b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.js new file mode 100644 index 00000000..565ce9e4 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.js @@ -0,0 +1,35 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +import isObject from 'isobject'; + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +export default function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(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; +}; diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json b/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json new file mode 100644 index 00000000..d1fb5d95 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json @@ -0,0 +1,127 @@ +{ + "_args": [ + [ + "is-plain-object@3.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "is-plain-object@3.0.0", + "_id": "is-plain-object@3.0.0", + "_inBundle": false, + "_integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "_location": "/@octokit/endpoint/is-plain-object", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-plain-object@3.0.0", + "name": "is-plain-object", + "escapedName": "is-plain-object", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint" + ], + "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Osman Nuri Okumuş", + "url": "http://onokumus.com" + }, + { + "name": "Steven Vachon", + "url": "https://svachon.com" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } + ], + "dependencies": { + "isobject": "^4.0.0" + }, + "description": "Returns true if an object was created by the `Object` constructor.", + "devDependencies": { + "chai": "^4.2.0", + "esm": "^3.2.22", + "gulp-format-md": "^1.0.0", + "mocha": "^6.1.4", + "mocha-headless-chrome": "^2.0.2", + "rollup": "^1.10.1", + "rollup-plugin-node-resolve": "^4.2.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.js", + "index.cjs.js" + ], + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "is-plain-object", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-plain-object.git" + }, + "scripts": { + "build": "rollup -c", + "prepare": "rollup -c", + "test": "npm run test_node && npm run build && npm run test_browser", + "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", + "test_node": "mocha -r esm" + }, + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "3.0.0" +} diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/LICENSE b/node_modules/@octokit/endpoint/node_modules/isobject/LICENSE new file mode 100644 index 00000000..943e71d0 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/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. \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/README.md b/node_modules/@octokit/endpoint/node_modules/isobject/README.md new file mode 100644 index 00000000..1c6e21fa --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/README.md @@ -0,0 +1,127 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) + +> Returns true if the value is an object and not an array or 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 isobject +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` + +## Usage + +```js +import isObject from 'isobject'; +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## 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: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [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.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 30 | [jonschlinkert](https://github.com/jonschlinkert) | +| 8 | [doowb](https://github.com/doowb) | +| 7 | [TrySound](https://github.com/TrySound) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [LeSuisse](https://github.com/LeSuisse) | +| 1 | [tmcw](https://github.com/tmcw) | +| 1 | [ZhouHansen](https://github.com/ZhouHansen) | + +### 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._ \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/index.cjs.js b/node_modules/@octokit/endpoint/node_modules/isobject/index.cjs.js new file mode 100644 index 00000000..49debe73 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/index.cjs.js @@ -0,0 +1,14 @@ +'use strict'; + +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} + +module.exports = isObject; diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/index.d.ts b/node_modules/@octokit/endpoint/node_modules/isobject/index.d.ts new file mode 100644 index 00000000..c471c715 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/index.d.ts @@ -0,0 +1,3 @@ +declare function isObject(val: any): boolean; + +export default isObject; diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/index.js b/node_modules/@octokit/endpoint/node_modules/isobject/index.js new file mode 100644 index 00000000..e9f03822 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/index.js @@ -0,0 +1,10 @@ +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +export default function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/package.json b/node_modules/@octokit/endpoint/node_modules/isobject/package.json new file mode 100644 index 00000000..078a4e57 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/package.json @@ -0,0 +1,128 @@ +{ + "_args": [ + [ + "isobject@4.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "isobject@4.0.0", + "_id": "isobject@4.0.0", + "_inBundle": false, + "_integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "_location": "/@octokit/endpoint/isobject", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isobject@4.0.0", + "name": "isobject", + "escapedName": "isobject", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint/is-plain-object" + ], + "_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "contributors": [ + { + "url": "https://github.com/LeSuisse" + }, + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Magnús Dæhlen", + "url": "https://github.com/magnudae" + }, + { + "name": "Tom MacWright", + "url": "https://macwright.org" + } + ], + "dependencies": {}, + "description": "Returns true if the value is an object and not an array or null.", + "devDependencies": { + "esm": "^3.2.22", + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5", + "rollup": "^1.10.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.cjs.js", + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/isobject", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "isobject", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/isobject.git" + }, + "scripts": { + "build": "rollup -i index.js -o index.cjs.js -f cjs", + "prepublish": "npm run build", + "test": "mocha -r esm" + }, + "types": "index.d.ts", + "verb": { + "related": { + "list": [ + "extend-shallow", + "is-plain-object", + "kind-of", + "merge-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "4.0.0" +} diff --git a/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/endpoint/package.json new file mode 100644 index 00000000..0d914092 --- /dev/null +++ b/node_modules/@octokit/endpoint/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + "@octokit/endpoint@5.5.1", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@octokit/endpoint@5.5.1", + "_id": "@octokit/endpoint@5.5.1", + "_inBundle": false, + "_integrity": "sha512-nBFhRUb5YzVTCX/iAK1MgQ4uWo89Gu0TH00qQHoYRCsE12dWcG1OiLd7v2EIo2+tpUKPMOQ62QFy9hy9Vg2ULg==", + "_location": "/@octokit/endpoint", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/endpoint@5.5.1", + "name": "@octokit/endpoint", + "escapedName": "@octokit%2fendpoint", + "scope": "@octokit", + "rawSpec": "5.5.1", + "saveSpec": null, + "fetchSpec": "5.5.1" + }, + "_requiredBy": [ + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.5.1.tgz", + "_spec": "5.5.1", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/octokit/endpoint.js/issues" + }, + "deno": "dist-web/index.js", + "dependencies": { + "@octokit/types": "^2.0.0", + "is-plain-object": "^3.0.0", + "universal-user-agent": "^4.0.0" + }, + "description": "Turns REST API endpoints into generic request options", + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.7.0", + "@pika/plugin-build-web": "^0.7.0", + "@pika/plugin-ts-standard-pkg": "^0.7.0", + "@types/jest": "^24.0.11", + "jest": "^24.7.1", + "prettier": "1.18.2", + "semantic-release": "^15.13.8", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^24.0.2", + "typescript": "^3.4.5" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/endpoint.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "license": "MIT", + "main": "dist-node/index.js", + "name": "@octokit/endpoint", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/endpoint.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "5.5.1" +} diff --git a/node_modules/@octokit/graphql/LICENSE b/node_modules/@octokit/graphql/LICENSE new file mode 100644 index 00000000..af5366d0 --- /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 00000000..dd797d94 --- /dev/null +++ b/node_modules/@octokit/graphql/README.md @@ -0,0 +1,380 @@ +# 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://travis-ci.com/octokit/graphql.js.svg?branch=master)](https://travis-ci.com/octokit/graphql.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/graphql.js.svg)](https://greenkeeper.io/) + + + +- [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 your own `@octokit/request` instance](#) +- [Errors](#errors) +- [Partial responses](#partial-responses) +- [Writing tests](#writing-tests) +- [License](#license) + + + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/graphql` directly from [cdn.pika.dev](https://cdn.pika.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 +``` + +## Errors + +In case of a GraphQL error, `error.message` is set to the first error from the response’s `errors` array. 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 } = require("@octokit/graphql"); +graphqlt = graphql.defaults({ + headers: { + authorization: `token secret123` + } +}); +const query = `{ + viewer { + bioHtml + } +}`; + +try { + const result = await graphql(query); +} catch (error) { + // server responds with + // { + // "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' +} +``` + +## 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 00000000..48bb799a --- /dev/null +++ b/node_modules/@octokit/graphql/dist-node/index.js @@ -0,0 +1,85 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var request = require('@octokit/request'); +var universalUserAgent = require('universal-user-agent'); + +const VERSION = "4.3.1"; + +class GraphqlError extends Error { + constructor(request, response) { + const message = response.data.errors[0].message; + super(message); + Object.assign(this, response.data); + this.name = "GraphqlError"; + this.request = request; // 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"]; +function graphql(request, query, options) { + options = typeof query === "string" ? options = Object.assign({ + query + }, options) : options = query; + const requestOptions = Object.keys(options).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = options[key]; + return result; + } + + if (!result.variables) { + result.variables = {}; + } + + result.variables[key] = options[key]; + return result; + }, {}); + return request(requestOptions).then(response => { + if (response.data.errors) { + throw new GraphqlError(requestOptions, { + data: 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.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 00000000..0e967f98 --- /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.3.1\";\n","export class GraphqlError extends Error {\n constructor(request, response) {\n const message = response.data.errors[0].message;\n super(message);\n Object.assign(this, response.data);\n this.name = \"GraphqlError\";\n this.request = request;\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 { GraphqlError } from \"./error\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\"\n];\nexport function graphql(request, query, options) {\n options =\n typeof query === \"string\"\n ? (options = Object.assign({ query }, options))\n : (options = query);\n const requestOptions = Object.keys(options).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = options[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = options[key];\n return result;\n }, {});\n return request(requestOptions).then(response => {\n if (response.data.errors) {\n throw new GraphqlError(requestOptions, {\n data: response.data\n });\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 function withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n"],"names":["VERSION","GraphqlError","Error","constructor","request","response","message","data","errors","Object","assign","name","captureStackTrace","NON_VARIABLE_OPTIONS","graphql","query","options","requestOptions","keys","reduce","result","key","includes","variables","then","withDefaults","newDefaults","newRequest","defaults","newApi","bind","endpoint","Request","headers","getUserAgent","method","url","withCustomRequest","customRequest"],"mappings":";;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAA,MAAMC,YAAN,SAA2BC,KAA3B,CAAiC;EACpCC,WAAW,CAACC,OAAD,EAAUC,QAAV,EAAoB;UACrBC,OAAO,GAAGD,QAAQ,CAACE,IAAT,CAAcC,MAAd,CAAqB,CAArB,EAAwBF,OAAxC;UACMA,OAAN;IACAG,MAAM,CAACC,MAAP,CAAc,IAAd,EAAoBL,QAAQ,CAACE,IAA7B;SACKI,IAAL,GAAY,cAAZ;SACKP,OAAL,GAAeA,OAAf,CAL2B;;;;QAQvBF,KAAK,CAACU,iBAAV,EAA6B;MACzBV,KAAK,CAACU,iBAAN,CAAwB,IAAxB,EAA8B,KAAKT,WAAnC;;;;;;ACTZ,MAAMU,oBAAoB,GAAG,CACzB,QADyB,EAEzB,SAFyB,EAGzB,KAHyB,EAIzB,SAJyB,EAKzB,SALyB,EAMzB,OANyB,CAA7B;AAQA,AAAO,SAASC,OAAT,CAAiBV,OAAjB,EAA0BW,KAA1B,EAAiCC,OAAjC,EAA0C;EAC7CA,OAAO,GACH,OAAOD,KAAP,KAAiB,QAAjB,GACOC,OAAO,GAAGP,MAAM,CAACC,MAAP,CAAc;IAAEK;GAAhB,EAAyBC,OAAzB,CADjB,GAEOA,OAAO,GAAGD,KAHrB;QAIME,cAAc,GAAGR,MAAM,CAACS,IAAP,CAAYF,OAAZ,EAAqBG,MAArB,CAA4B,CAACC,MAAD,EAASC,GAAT,KAAiB;QAC5DR,oBAAoB,CAACS,QAArB,CAA8BD,GAA9B,CAAJ,EAAwC;MACpCD,MAAM,CAACC,GAAD,CAAN,GAAcL,OAAO,CAACK,GAAD,CAArB;aACOD,MAAP;;;QAEA,CAACA,MAAM,CAACG,SAAZ,EAAuB;MACnBH,MAAM,CAACG,SAAP,GAAmB,EAAnB;;;IAEJH,MAAM,CAACG,SAAP,CAAiBF,GAAjB,IAAwBL,OAAO,CAACK,GAAD,CAA/B;WACOD,MAAP;GATmB,EAUpB,EAVoB,CAAvB;SAWOhB,OAAO,CAACa,cAAD,CAAP,CAAwBO,IAAxB,CAA6BnB,QAAQ,IAAI;QACxCA,QAAQ,CAACE,IAAT,CAAcC,MAAlB,EAA0B;YAChB,IAAIP,YAAJ,CAAiBgB,cAAjB,EAAiC;QACnCV,IAAI,EAAEF,QAAQ,CAACE;OADb,CAAN;;;WAIGF,QAAQ,CAACE,IAAT,CAAcA,IAArB;GANG,CAAP;;;ACvBG,SAASkB,YAAT,CAAsBrB,SAAtB,EAA+BsB,WAA/B,EAA4C;QACzCC,UAAU,GAAGvB,SAAO,CAACwB,QAAR,CAAiBF,WAAjB,CAAnB;;QACMG,MAAM,GAAG,CAACd,KAAD,EAAQC,OAAR,KAAoB;WACxBF,OAAO,CAACa,UAAD,EAAaZ,KAAb,EAAoBC,OAApB,CAAd;GADJ;;SAGOP,MAAM,CAACC,MAAP,CAAcmB,MAAd,EAAsB;IACzBD,QAAQ,EAAEH,YAAY,CAACK,IAAb,CAAkB,IAAlB,EAAwBH,UAAxB,CADe;IAEzBI,QAAQ,EAAEC,eAAO,CAACD;GAFf,CAAP;;;MCHSjB,SAAO,GAAGW,YAAY,CAACrB,eAAD,EAAU;EACzC6B,OAAO,EAAE;kBACU,sBAAqBjC,OAAQ,IAAGkC,+BAAY,EAAG;GAFzB;EAIzCC,MAAM,EAAE,MAJiC;EAKzCC,GAAG,EAAE;CAL0B,CAA5B;AAOP,AAAO,SAASC,iBAAT,CAA2BC,aAA3B,EAA0C;SACtCb,YAAY,CAACa,aAAD,EAAgB;IAC/BH,MAAM,EAAE,MADuB;IAE/BC,GAAG,EAAE;GAFU,CAAnB;;;;;;"} \ 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 00000000..7662b91f --- /dev/null +++ b/node_modules/@octokit/graphql/dist-src/error.js @@ -0,0 +1,14 @@ +export class GraphqlError extends Error { + constructor(request, response) { + const message = response.data.errors[0].message; + super(message); + Object.assign(this, response.data); + this.name = "GraphqlError"; + this.request = request; + // 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 00000000..ea20a548 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-src/graphql.js @@ -0,0 +1,34 @@ +import { GraphqlError } from "./error"; +const NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query" +]; +export function graphql(request, query, options) { + options = + typeof query === "string" + ? (options = Object.assign({ query }, options)) + : (options = query); + const requestOptions = Object.keys(options).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = options[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = options[key]; + return result; + }, {}); + return request(requestOptions).then(response => { + if (response.data.errors) { + throw new GraphqlError(requestOptions, { + data: 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 00000000..5b01f2c7 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-src/index.js @@ -0,0 +1,17 @@ +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 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 00000000..e69de29b 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 00000000..c51216ae --- /dev/null +++ b/node_modules/@octokit/graphql/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "4.3.1"; 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 00000000..3a5b4513 --- /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 00000000..692dc671 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-types/error.d.ts @@ -0,0 +1,7 @@ +import { EndpointOptions, GraphQlQueryResponse } from "./types"; +export declare class GraphqlError extends Error { + request: EndpointOptions; + constructor(request: EndpointOptions, response: { + data: Required; + }); +} 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 00000000..47c58006 --- /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 00000000..1878fd41 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-types/index.d.ts @@ -0,0 +1,3 @@ +import { request } from "@octokit/request"; +export declare const graphql: import("./types").graphql; +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 00000000..2bf164b7 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-types/types.d.ts @@ -0,0 +1,47 @@ +import * as OctokitTypes from "@octokit/types"; +import { graphql } from "./graphql"; +export declare type EndpointOptions = OctokitTypes.EndpointOptions; +export declare type RequestParameters = OctokitTypes.RequestParameters; +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: OctokitTypes.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?: OctokitTypes.RequestParameters): GraphQlResponse; + /** + * Returns a new `endpoint` with updated route and parameters + */ + defaults: (newDefaults: OctokitTypes.RequestParameters) => graphql; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: OctokitTypes.EndpointInterface; +} +export declare type GraphQlResponse = ReturnType; +export declare type GraphQlQueryResponseData = { + [key: string]: any; +} | null; +export declare type GraphQlQueryResponse = { + data: GraphQlQueryResponseData; + errors?: [{ + 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 00000000..cd3ef1e6 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "4.3.1"; 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 00000000..03edc320 --- /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 00000000..d4d8c4f5 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-web/index.js @@ -0,0 +1,81 @@ +import { request } from '@octokit/request'; +import { getUserAgent } from 'universal-user-agent'; + +const VERSION = "4.3.1"; + +class GraphqlError extends Error { + constructor(request, response) { + const message = response.data.errors[0].message; + super(message); + Object.assign(this, response.data); + this.name = "GraphqlError"; + this.request = request; + // 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" +]; +function graphql(request, query, options) { + options = + typeof query === "string" + ? (options = Object.assign({ query }, options)) + : (options = query); + const requestOptions = Object.keys(options).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = options[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = options[key]; + return result; + }, {}); + return request(requestOptions).then(response => { + if (response.data.errors) { + throw new GraphqlError(requestOptions, { + data: 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 { 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 00000000..efa902e5 --- /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.3.1\";\n","export class GraphqlError extends Error {\n constructor(request, response) {\n const message = response.data.errors[0].message;\n super(message);\n Object.assign(this, response.data);\n this.name = \"GraphqlError\";\n this.request = request;\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 { GraphqlError } from \"./error\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\"\n];\nexport function graphql(request, query, options) {\n options =\n typeof query === \"string\"\n ? (options = Object.assign({ query }, options))\n : (options = query);\n const requestOptions = Object.keys(options).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = options[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = options[key];\n return result;\n }, {});\n return request(requestOptions).then(response => {\n if (response.data.errors) {\n throw new GraphqlError(requestOptions, {\n data: response.data\n });\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 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,CAAC;;ACApC,MAAM,YAAY,SAAS,KAAK,CAAC;IACpC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE;QAC3B,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;;;QAGvB,IAAI,KAAK,CAAC,iBAAiB,EAAE;YACzB,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;SACnD;KACJ;CACJ;;ACZD,MAAM,oBAAoB,GAAG;IACzB,QAAQ;IACR,SAAS;IACT,KAAK;IACL,SAAS;IACT,SAAS;IACT,OAAO;CACV,CAAC;AACF,AAAO,SAAS,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAC7C,OAAO;QACH,OAAO,KAAK,KAAK,QAAQ;eAClB,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC;eAC3C,OAAO,GAAG,KAAK,CAAC,CAAC;IAC5B,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;QAChE,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACpC,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;YAC3B,OAAO,MAAM,CAAC;SACjB;QACD,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;YACnB,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;SACzB;QACD,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QACrC,OAAO,MAAM,CAAC;KACjB,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,OAAO,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI;QAC5C,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE;YACtB,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE;gBACnC,IAAI,EAAE,QAAQ,CAAC,IAAI;aACtB,CAAC,CAAC;SACN;QACD,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;KAC7B,CAAC,CAAC;CACN;;AC/BM,SAAS,YAAY,CAACA,SAAO,EAAE,WAAW,EAAE;IAC/C,MAAM,UAAU,GAAGA,SAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK;QAC/B,OAAO,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;KAC9C,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;QACzB,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;QAC7C,QAAQ,EAAEC,OAAO,CAAC,QAAQ;KAC7B,CAAC,CAAC;CACN;;ACPW,MAACC,SAAO,GAAG,YAAY,CAAC,OAAO,EAAE;IACzC,OAAO,EAAE;QACL,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;KAClE;IACD,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,UAAU;CAClB,CAAC,CAAC;AACH,AAAO,SAAS,iBAAiB,CAAC,aAAa,EAAE;IAC7C,OAAO,YAAY,CAAC,aAAa,EAAE;QAC/B,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,UAAU;KAClB,CAAC,CAAC;CACN;;;;"} \ 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 00000000..676aacb3 --- /dev/null +++ b/node_modules/@octokit/graphql/package.json @@ -0,0 +1,83 @@ +{ + "_args": [ + [ + "@octokit/graphql@4.3.1", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@octokit/graphql@4.3.1", + "_id": "@octokit/graphql@4.3.1", + "_inBundle": false, + "_integrity": "sha512-hCdTjfvrK+ilU2keAdqNBWOk+gm1kai1ZcdjRfB30oA3/T6n53UVJb7w0L5cR3/rhU91xT3HSqCd+qbvH06yxA==", + "_location": "/@octokit/graphql", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/graphql@4.3.1", + "name": "@octokit/graphql", + "escapedName": "@octokit%2fgraphql", + "scope": "@octokit", + "rawSpec": "4.3.1", + "saveSpec": null, + "fetchSpec": "4.3.1" + }, + "_requiredBy": [ + "/@actions/github" + ], + "_resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.3.1.tgz", + "_spec": "4.3.1", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/octokit/graphql.js/issues" + }, + "deno": "dist-web/index.js", + "dependencies": { + "@octokit/request": "^5.3.0", + "@octokit/types": "^2.0.0", + "universal-user-agent": "^4.0.0" + }, + "description": "GitHub GraphQL API client for browsers and Node", + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.7.0", + "@pika/plugin-build-web": "^0.7.0", + "@pika/plugin-ts-standard-pkg": "^0.7.0", + "@types/fetch-mock": "^7.2.5", + "@types/jest": "^24.0.13", + "@types/node": "^12.0.2", + "fetch-mock": "^7.3.1", + "jest": "^24.8.0", + "prettier": "^1.17.1", + "semantic-release": "^15.13.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^24.0.2", + "typescript": "^3.4.5" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/graphql.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "graphql" + ], + "license": "MIT", + "main": "dist-node/index.js", + "name": "@octokit/graphql", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/graphql.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "4.3.1" +} diff --git a/node_modules/@octokit/request-error/LICENSE b/node_modules/@octokit/request-error/LICENSE new file mode 100644 index 00000000..ef2c18ee --- /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 00000000..bcb711d9 --- /dev/null +++ b/node_modules/@octokit/request-error/README.md @@ -0,0 +1,68 @@ +# 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://travis-ci.com/octokit/request-error.js.svg?branch=master)](https://travis-ci.com/octokit/request-error.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/request-error.js.svg)](https://greenkeeper.io/) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request-error directly from cdn.pika.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.headers; // { 'x-github-request-id': '1:2:3:4' } +error.request.method; // POST +error.request.url; // https://api.github.com/foo +error.request.body; // { bar: 'baz' } +error.request.headers; // { authorization: 'token [REDACTED]' } +``` + +## 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 00000000..95b9c579 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-node/index.js @@ -0,0 +1,55 @@ +'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 logOnce = 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; + Object.defineProperty(this, "code", { + get() { + logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + + }); + this.headers = options.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; + } + +} + +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 00000000..ec1c6dbc --- /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 logOnce = 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 Object.defineProperty(this, \"code\", {\n get() {\n logOnce(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n }\n });\n this.headers = options.headers || {};\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 }\n}\n"],"names":["logOnce","once","deprecation","console","warn","RequestError","Error","constructor","message","statusCode","options","captureStackTrace","name","status","Object","defineProperty","get","Deprecation","headers","requestCopy","assign","request","authorization","replace","url"],"mappings":";;;;;;;;;AAEA,MAAMA,OAAO,GAAGC,IAAI,CAAEC,WAAD,IAAiBC,OAAO,CAACC,IAAR,CAAaF,WAAb,CAAlB,CAApB;;;;;AAIA,AAAO,MAAMG,YAAN,SAA2BC,KAA3B,CAAiC;EACpCC,WAAW,CAACC,OAAD,EAAUC,UAAV,EAAsBC,OAAtB,EAA+B;UAChCF,OAAN,EADsC;;;;QAIlCF,KAAK,CAACK,iBAAV,EAA6B;MACzBL,KAAK,CAACK,iBAAN,CAAwB,IAAxB,EAA8B,KAAKJ,WAAnC;;;SAECK,IAAL,GAAY,WAAZ;SACKC,MAAL,GAAcJ,UAAd;IACAK,MAAM,CAACC,cAAP,CAAsB,IAAtB,EAA4B,MAA5B,EAAoC;MAChCC,GAAG,GAAG;QACFhB,OAAO,CAAC,IAAIiB,uBAAJ,CAAgB,0EAAhB,CAAD,CAAP;eACOR,UAAP;;;KAHR;SAMKS,OAAL,GAAeR,OAAO,CAACQ,OAAR,IAAmB,EAAlC,CAfsC;;UAiBhCC,WAAW,GAAGL,MAAM,CAACM,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACW,OAA1B,CAApB;;QACIX,OAAO,CAACW,OAAR,CAAgBH,OAAhB,CAAwBI,aAA5B,EAA2C;MACvCH,WAAW,CAACD,OAAZ,GAAsBJ,MAAM,CAACM,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACW,OAAR,CAAgBH,OAAlC,EAA2C;QAC7DI,aAAa,EAAEZ,OAAO,CAACW,OAAR,CAAgBH,OAAhB,CAAwBI,aAAxB,CAAsCC,OAAtC,CAA8C,MAA9C,EAAsD,aAAtD;OADG,CAAtB;;;IAIJJ,WAAW,CAACK,GAAZ,GAAkBL,WAAW,CAACK,GAAZ;;KAGbD,OAHa,CAGL,sBAHK,EAGmB,0BAHnB;;KAMbA,OANa,CAML,qBANK,EAMkB,yBANlB,CAAlB;SAOKF,OAAL,GAAeF,WAAf;;;;;;;"} \ 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 00000000..cfcb7c41 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-src/index.js @@ -0,0 +1,40 @@ +import { Deprecation } from "deprecation"; +import once from "once"; +const logOnce = 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; + Object.defineProperty(this, "code", { + get() { + logOnce(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + }); + this.headers = options.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; + } +} 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 00000000..e69de29b 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 00000000..baa8a0eb --- /dev/null +++ b/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -0,0 +1,27 @@ +import { RequestOptions, ResponseHeaders } 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; + /** + * error response headers + */ + headers: ResponseHeaders; + /** + * Request options that lead to the error. + */ + request: RequestOptions; + 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 00000000..865d2139 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -0,0 +1,5 @@ +import { RequestOptions, ResponseHeaders } from "@octokit/types"; +export declare type RequestErrorOptions = { + headers?: ResponseHeaders; + 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 00000000..32b45a36 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-web/index.js @@ -0,0 +1,44 @@ +import { Deprecation } from 'deprecation'; +import once from 'once'; + +const logOnce = 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; + Object.defineProperty(this, "code", { + get() { + logOnce(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + }); + this.headers = options.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; + } +} + +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 00000000..05151b09 --- /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 logOnce = 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 Object.defineProperty(this, \"code\", {\n get() {\n logOnce(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n }\n });\n this.headers = options.headers || {};\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 }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;;;;AAIjE,AAAO,MAAM,YAAY,SAAS,KAAK,CAAC;IACpC,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE;QACtC,KAAK,CAAC,OAAO,CAAC,CAAC;;;QAGf,IAAI,KAAK,CAAC,iBAAiB,EAAE;YACzB,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;SACnD;QACD,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;QACzB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;YAChC,GAAG,GAAG;gBACF,OAAO,CAAC,IAAI,WAAW,CAAC,0EAA0E,CAAC,CAAC,CAAC;gBACrG,OAAO,UAAU,CAAC;aACrB;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;;QAErC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;YACvC,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;gBAC7D,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;aACtF,CAAC,CAAC;SACN;QACD,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG;;;aAG5B,OAAO,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;;;aAG3D,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;QAC/D,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;KAC9B;CACJ;;;;"} \ 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 00000000..cfad7f43 --- /dev/null +++ b/node_modules/@octokit/request-error/package.json @@ -0,0 +1,84 @@ +{ + "_args": [ + [ + "@octokit/request-error@1.2.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@octokit/request-error@1.2.0", + "_id": "@octokit/request-error@1.2.0", + "_inBundle": false, + "_integrity": "sha512-DNBhROBYjjV/I9n7A8kVkmQNkqFAMem90dSxqvPq57e2hBr7mNTX98y3R2zDpqMQHVRpBDjsvsfIGgBzy+4PAg==", + "_location": "/@octokit/request-error", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/request-error@1.2.0", + "name": "@octokit/request-error", + "escapedName": "@octokit%2frequest-error", + "scope": "@octokit", + "rawSpec": "1.2.0", + "saveSpec": null, + "fetchSpec": "1.2.0" + }, + "_requiredBy": [ + "/@octokit/request", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.0.tgz", + "_spec": "1.2.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/octokit/request-error.js/issues" + }, + "deno": "dist-web/index.js", + "dependencies": { + "@octokit/types": "^2.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "description": "Error class for Octokit request errors", + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.7.0", + "@pika/plugin-build-web": "^0.7.0", + "@pika/plugin-bundle-web": "^0.7.0", + "@pika/plugin-ts-standard-pkg": "^0.7.0", + "@types/jest": "^24.0.12", + "@types/node": "^12.0.2", + "@types/once": "^1.4.0", + "jest": "^24.7.1", + "pika-plugin-unpkg-field": "^1.1.0", + "prettier": "^1.17.0", + "semantic-release": "^15.10.5", + "ts-jest": "^24.0.2", + "typescript": "^3.4.5" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/request-error.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "license": "MIT", + "main": "dist-node/index.js", + "name": "@octokit/request-error", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/request-error.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "1.2.0" +} diff --git a/node_modules/@octokit/request/LICENSE b/node_modules/@octokit/request/LICENSE new file mode 100644 index 00000000..af5366d0 --- /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 00000000..db35e628 --- /dev/null +++ b/node_modules/@octokit/request/README.md @@ -0,0 +1,539 @@ +# 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://travis-ci.org/octokit/request.js.svg?branch=master)](https://travis-ci.org/octokit/request.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/request.js.svg)](https://greenkeeper.io/) + +`@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.pika.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 request("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({ + id: 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 + + 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 + + Required. Any supported http verb, case insensitive. 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 + + Required. 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.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.headers` The http response headers as an object +- `error.request` The request options such as `method`, `url` 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 00000000..19b227bf --- /dev/null +++ b/node_modules/@octokit/request/dist-node/index.js @@ -0,0 +1,148 @@ +'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 = _interopDefault(require('is-plain-object')); +var nodeFetch = _interopDefault(require('node-fetch')); +var requestError = require('@octokit/request-error'); + +const VERSION = "5.3.1"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + 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)).then(response => { + url = response.url; + status = response.status; + + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + + if (status === 204 || status === 205) { + return; + } // GitHub API returns 200 for HEAD requsets + + + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + + throw new requestError.RequestError(response.statusText, status, { + headers, + request: requestOptions + }); + } + + if (status === 304) { + throw new requestError.RequestError("Not modified", status, { + headers, + request: requestOptions + }); + } + + if (status >= 400) { + return response.text().then(message => { + const error = new requestError.RequestError(message, status, { + headers, + request: requestOptions + }); + + try { + let responseBody = JSON.parse(error.message); + Object.assign(error, responseBody); + let errors = responseBody.errors; // Assumption `errors` would always be in Array Fotmat + + error.message = error.message + ": " + errors.map(JSON.stringify).join(", "); + } catch (e) {// ignore, see octokit/rest.js#684 + } + + throw error; + }); + } + + 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); + }).then(data => { + return { + status, + url, + headers, + data + }; + }).catch(error => { + if (error instanceof requestError.RequestError) { + throw error; + } + + throw new requestError.RequestError(error.message, 500, { + headers, + request: requestOptions + }); + }); +} + +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 00000000..b0ffb707 --- /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.3.1\";\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 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 }, requestOptions.request))\n .then(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 (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requsets\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n headers,\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n headers,\n request: requestOptions\n });\n }\n if (status >= 400) {\n return response\n .text()\n .then(message => {\n const error = new RequestError(message, status, {\n headers,\n request: requestOptions\n });\n try {\n let responseBody = JSON.parse(error.message);\n Object.assign(error, responseBody);\n let errors = responseBody.errors;\n // Assumption `errors` would always be in Array Fotmat\n error.message =\n error.message + \": \" + errors.map(JSON.stringify).join(\", \");\n }\n catch (e) {\n // ignore, see octokit/rest.js#684\n }\n throw error;\n });\n }\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 })\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 }\n throw new RequestError(error.message, 500, {\n headers,\n request: requestOptions\n });\n });\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","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","request","nodeFetch","Object","assign","method","redirect","then","keyAndValue","RequestError","statusText","text","message","error","responseBody","parse","errors","map","join","e","contentType","get","test","json","getBuffer","data","catch","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAQ,SAASC,iBAAT,CAA2BC,QAA3B,EAAqC;SACzCA,QAAQ,CAACC,WAAT,EAAP;;;ACGW,SAASC,YAAT,CAAsBC,cAAtB,EAAsC;MAC7CC,aAAa,CAACD,cAAc,CAACE,IAAhB,CAAb,IACAC,KAAK,CAACC,OAAN,CAAcJ,cAAc,CAACE,IAA7B,CADJ,EACwC;IACpCF,cAAc,CAACE,IAAf,GAAsBG,IAAI,CAACC,SAAL,CAAeN,cAAc,CAACE,IAA9B,CAAtB;;;MAEAK,OAAO,GAAG,EAAd;MACIC,MAAJ;MACIC,GAAJ;QACMC,KAAK,GAAIV,cAAc,CAACW,OAAf,IAA0BX,cAAc,CAACW,OAAf,CAAuBD,KAAlD,IAA4DE,SAA1E;SACOF,KAAK,CAACV,cAAc,CAACS,GAAhB,EAAqBI,MAAM,CAACC,MAAP,CAAc;IAC3CC,MAAM,EAAEf,cAAc,CAACe,MADoB;IAE3Cb,IAAI,EAAEF,cAAc,CAACE,IAFsB;IAG3CK,OAAO,EAAEP,cAAc,CAACO,OAHmB;IAI3CS,QAAQ,EAAEhB,cAAc,CAACgB;GAJI,EAK9BhB,cAAc,CAACW,OALe,CAArB,CAAL,CAMFM,IANE,CAMGpB,QAAQ,IAAI;IAClBY,GAAG,GAAGZ,QAAQ,CAACY,GAAf;IACAD,MAAM,GAAGX,QAAQ,CAACW,MAAlB;;SACK,MAAMU,WAAX,IAA0BrB,QAAQ,CAACU,OAAnC,EAA4C;MACxCA,OAAO,CAACW,WAAW,CAAC,CAAD,CAAZ,CAAP,GAA0BA,WAAW,CAAC,CAAD,CAArC;;;QAEAV,MAAM,KAAK,GAAX,IAAkBA,MAAM,KAAK,GAAjC,EAAsC;;KANpB;;;QAUdR,cAAc,CAACe,MAAf,KAA0B,MAA9B,EAAsC;UAC9BP,MAAM,GAAG,GAAb,EAAkB;;;;YAGZ,IAAIW,yBAAJ,CAAiBtB,QAAQ,CAACuB,UAA1B,EAAsCZ,MAAtC,EAA8C;QAChDD,OADgD;QAEhDI,OAAO,EAAEX;OAFP,CAAN;;;QAKAQ,MAAM,KAAK,GAAf,EAAoB;YACV,IAAIW,yBAAJ,CAAiB,cAAjB,EAAiCX,MAAjC,EAAyC;QAC3CD,OAD2C;QAE3CI,OAAO,EAAEX;OAFP,CAAN;;;QAKAQ,MAAM,IAAI,GAAd,EAAmB;aACRX,QAAQ,CACVwB,IADE,GAEFJ,IAFE,CAEGK,OAAO,IAAI;cACXC,KAAK,GAAG,IAAIJ,yBAAJ,CAAiBG,OAAjB,EAA0Bd,MAA1B,EAAkC;UAC5CD,OAD4C;UAE5CI,OAAO,EAAEX;SAFC,CAAd;;YAII;cACIwB,YAAY,GAAGnB,IAAI,CAACoB,KAAL,CAAWF,KAAK,CAACD,OAAjB,CAAnB;UACAT,MAAM,CAACC,MAAP,CAAcS,KAAd,EAAqBC,YAArB;cACIE,MAAM,GAAGF,YAAY,CAACE,MAA1B,CAHA;;UAKAH,KAAK,CAACD,OAAN,GACIC,KAAK,CAACD,OAAN,GAAgB,IAAhB,GAAuBI,MAAM,CAACC,GAAP,CAAWtB,IAAI,CAACC,SAAhB,EAA2BsB,IAA3B,CAAgC,IAAhC,CAD3B;SALJ,CAQA,OAAOC,CAAP,EAAU;;;cAGJN,KAAN;OAlBG,CAAP;;;UAqBEO,WAAW,GAAGjC,QAAQ,CAACU,OAAT,CAAiBwB,GAAjB,CAAqB,cAArB,CAApB;;QACI,oBAAoBC,IAApB,CAAyBF,WAAzB,CAAJ,EAA2C;aAChCjC,QAAQ,CAACoC,IAAT,EAAP;;;QAEA,CAACH,WAAD,IAAgB,yBAAyBE,IAAzB,CAA8BF,WAA9B,CAApB,EAAgE;aACrDjC,QAAQ,CAACwB,IAAT,EAAP;;;WAEGa,iBAAS,CAACrC,QAAD,CAAhB;GA5DG,EA8DFoB,IA9DE,CA8DGkB,IAAI,IAAI;WACP;MACH3B,MADG;MAEHC,GAFG;MAGHF,OAHG;MAIH4B;KAJJ;GA/DG,EAsEFC,KAtEE,CAsEIb,KAAK,IAAI;QACZA,KAAK,YAAYJ,yBAArB,EAAmC;YACzBI,KAAN;;;UAEE,IAAIJ,yBAAJ,CAAiBI,KAAK,CAACD,OAAvB,EAAgC,GAAhC,EAAqC;MACvCf,OADuC;MAEvCI,OAAO,EAAEX;KAFP,CAAN;GA1EG,CAAP;;;ACZW,SAASqC,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;QACrDC,QAAQ,GAAGF,WAAW,CAACG,QAAZ,CAAqBF,WAArB,CAAjB;;QACMG,MAAM,GAAG,UAAUC,KAAV,EAAiBC,UAAjB,EAA6B;UAClCC,eAAe,GAAGL,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAxB;;QACI,CAACC,eAAe,CAAClC,OAAjB,IAA4B,CAACkC,eAAe,CAAClC,OAAhB,CAAwBoC,IAAzD,EAA+D;aACpDhD,YAAY,CAACyC,QAAQ,CAACf,KAAT,CAAeoB,eAAf,CAAD,CAAnB;;;UAEElC,OAAO,GAAG,CAACgC,KAAD,EAAQC,UAAR,KAAuB;aAC5B7C,YAAY,CAACyC,QAAQ,CAACf,KAAT,CAAee,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAf,CAAD,CAAnB;KADJ;;IAGA/B,MAAM,CAACC,MAAP,CAAcH,OAAd,EAAuB;MACnB6B,QADmB;MAEnBC,QAAQ,EAAEJ,YAAY,CAACW,IAAb,CAAkB,IAAlB,EAAwBR,QAAxB;KAFd;WAIOK,eAAe,CAAClC,OAAhB,CAAwBoC,IAAxB,CAA6BpC,OAA7B,EAAsCkC,eAAtC,CAAP;GAZJ;;SAcOhC,MAAM,CAACC,MAAP,CAAc4B,MAAd,EAAsB;IACzBF,QADyB;IAEzBC,QAAQ,EAAEJ,YAAY,CAACW,IAAb,CAAkB,IAAlB,EAAwBR,QAAxB;GAFP,CAAP;;;MCbS7B,OAAO,GAAG0B,YAAY,CAACG,iBAAD,EAAW;EAC1CjC,OAAO,EAAE;kBACU,sBAAqBZ,OAAQ,IAAGsD,+BAAY,EAAG;;CAFnC,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 00000000..f2b80d7e --- /dev/null +++ b/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -0,0 +1,93 @@ +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) { + 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)) + .then(response => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requsets + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + headers, + request: requestOptions + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + headers, + request: requestOptions + }); + } + if (status >= 400) { + return response + .text() + .then(message => { + const error = new RequestError(message, status, { + headers, + request: requestOptions + }); + try { + let responseBody = JSON.parse(error.message); + Object.assign(error, responseBody); + let errors = responseBody.errors; + // Assumption `errors` would always be in Array Fotmat + error.message = + error.message + ": " + errors.map(JSON.stringify).join(", "); + } + catch (e) { + // ignore, see octokit/rest.js#684 + } + throw error; + }); + } + 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); + }) + .then(data => { + return { + status, + url, + headers, + data + }; + }) + .catch(error => { + if (error instanceof RequestError) { + throw error; + } + throw new RequestError(error.message, 500, { + headers, + request: requestOptions + }); + }); +} 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 00000000..845a3947 --- /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 00000000..6a36142d --- /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 00000000..6250d76e --- /dev/null +++ b/node_modules/@octokit/request/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "5.3.1"; 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 00000000..8e44f46e --- /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 00000000..594bce61 --- /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?: string; +}): 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 00000000..915b7057 --- /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 00000000..cb9c9bad --- /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 00000000..c32c7ab0 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "5.3.1"; 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 00000000..00804693 --- /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 00000000..3f51926e --- /dev/null +++ b/node_modules/@octokit/request/dist-web/index.js @@ -0,0 +1,132 @@ +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.3.1"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + 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)) + .then(response => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requsets + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + headers, + request: requestOptions + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + headers, + request: requestOptions + }); + } + if (status >= 400) { + return response + .text() + .then(message => { + const error = new RequestError(message, status, { + headers, + request: requestOptions + }); + try { + let responseBody = JSON.parse(error.message); + Object.assign(error, responseBody); + let errors = responseBody.errors; + // Assumption `errors` would always be in Array Fotmat + error.message = + error.message + ": " + errors.map(JSON.stringify).join(", "); + } + catch (e) { + // ignore, see octokit/rest.js#684 + } + throw error; + }); + } + 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); + }) + .then(data => { + return { + status, + url, + headers, + data + }; + }) + .catch(error => { + if (error instanceof RequestError) { + throw error; + } + throw new RequestError(error.message, 500, { + headers, + request: requestOptions + }); + }); +} + +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 00000000..f4c30849 --- /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.3.1\";\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 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 }, requestOptions.request))\n .then(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 (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requsets\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n headers,\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n headers,\n request: requestOptions\n });\n }\n if (status >= 400) {\n return response\n .text()\n .then(message => {\n const error = new RequestError(message, status, {\n headers,\n request: requestOptions\n });\n try {\n let responseBody = JSON.parse(error.message);\n Object.assign(error, responseBody);\n let errors = responseBody.errors;\n // Assumption `errors` would always be in Array Fotmat\n error.message =\n error.message + \": \" + errors.map(JSON.stringify).join(\", \");\n }\n catch (e) {\n // ignore, see octokit/rest.js#684\n }\n throw error;\n });\n }\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 })\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 }\n throw new RequestError(error.message, 500, {\n headers,\n request: requestOptions\n });\n });\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,CAAC;;ACA5B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;IAChD,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;CACjC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;IACjD,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;QAClC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;QACpC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;KAC7D;IACD,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,MAAM,CAAC;IACX,IAAI,GAAG,CAAC;IACR,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC;IACpF,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;QAC3C,MAAM,EAAE,cAAc,CAAC,MAAM;QAC7B,IAAI,EAAE,cAAc,CAAC,IAAI;QACzB,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,QAAQ,EAAE,cAAc,CAAC,QAAQ;KACpC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;SACtB,IAAI,CAAC,QAAQ,IAAI;QAClB,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;QACnB,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzB,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;YACxC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;SAC5C;QACD,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;YAClC,OAAO;SACV;;QAED,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;YAClC,IAAI,MAAM,GAAG,GAAG,EAAE;gBACd,OAAO;aACV;YACD,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;gBAChD,OAAO;gBACP,OAAO,EAAE,cAAc;aAC1B,CAAC,CAAC;SACN;QACD,IAAI,MAAM,KAAK,GAAG,EAAE;YAChB,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;gBAC3C,OAAO;gBACP,OAAO,EAAE,cAAc;aAC1B,CAAC,CAAC;SACN;QACD,IAAI,MAAM,IAAI,GAAG,EAAE;YACf,OAAO,QAAQ;iBACV,IAAI,EAAE;iBACN,IAAI,CAAC,OAAO,IAAI;gBACjB,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE;oBAC5C,OAAO;oBACP,OAAO,EAAE,cAAc;iBAC1B,CAAC,CAAC;gBACH,IAAI;oBACA,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;oBAC7C,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;oBACnC,IAAI,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;;oBAEjC,KAAK,CAAC,OAAO;wBACT,KAAK,CAAC,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACpE;gBACD,OAAO,CAAC,EAAE;;iBAET;gBACD,MAAM,KAAK,CAAC;aACf,CAAC,CAAC;SACN;QACD,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACzD,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YACvC,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;SAC1B;QACD,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YAC5D,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;SAC1B;QACD,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;KAC9B,CAAC;SACG,IAAI,CAAC,IAAI,IAAI;QACd,OAAO;YACH,MAAM;YACN,GAAG;YACH,OAAO;YACP,IAAI;SACP,CAAC;KACL,CAAC;SACG,KAAK,CAAC,KAAK,IAAI;QAChB,IAAI,KAAK,YAAY,YAAY,EAAE;YAC/B,MAAM,KAAK,CAAC;SACf;QACD,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;YACvC,OAAO;YACP,OAAO,EAAE,cAAc;SAC1B,CAAC,CAAC;KACN,CAAC,CAAC;CACN;;AC3Fc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;IAC3D,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;QACxC,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAC1D,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;YAC3D,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;SACxD;QACD,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;YACnC,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;SAC1E,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACnB,QAAQ;YACR,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;SAC9C,CAAC,CAAC;QACH,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;KACjE,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;QACzB,QAAQ;QACR,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;KAC9C,CAAC,CAAC;CACN;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;IAC1C,OAAO,EAAE;QACL,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;KAClE;CACJ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/LICENSE b/node_modules/@octokit/request/node_modules/is-plain-object/LICENSE new file mode 100644 index 00000000..3f2eca18 --- /dev/null +++ b/node_modules/@octokit/request/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/@octokit/request/node_modules/is-plain-object/README.md b/node_modules/@octokit/request/node_modules/is-plain-object/README.md new file mode 100644 index 00000000..60b7b591 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/README.md @@ -0,0 +1,119 @@ +# 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. + +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 + +```js +import isPlainObject from 'is-plain-object'; +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> 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._ \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/index.cjs.js b/node_modules/@octokit/request/node_modules/is-plain-object/index.cjs.js new file mode 100644 index 00000000..d7dda951 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/index.cjs.js @@ -0,0 +1,48 @@ +'use strict'; + +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} + +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(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; +} + +module.exports = isPlainObject; diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/index.d.ts b/node_modules/@octokit/request/node_modules/is-plain-object/index.d.ts new file mode 100644 index 00000000..fd131f01 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,3 @@ +declare function isPlainObject(o: any): boolean; + +export default isPlainObject; diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/index.js b/node_modules/@octokit/request/node_modules/is-plain-object/index.js new file mode 100644 index 00000000..565ce9e4 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/index.js @@ -0,0 +1,35 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +import isObject from 'isobject'; + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +export default function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(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; +}; diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/package.json b/node_modules/@octokit/request/node_modules/is-plain-object/package.json new file mode 100644 index 00000000..a9d792da --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/package.json @@ -0,0 +1,127 @@ +{ + "_args": [ + [ + "is-plain-object@3.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "is-plain-object@3.0.0", + "_id": "is-plain-object@3.0.0", + "_inBundle": false, + "_integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "_location": "/@octokit/request/is-plain-object", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-plain-object@3.0.0", + "name": "is-plain-object", + "escapedName": "is-plain-object", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Osman Nuri Okumuş", + "url": "http://onokumus.com" + }, + { + "name": "Steven Vachon", + "url": "https://svachon.com" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } + ], + "dependencies": { + "isobject": "^4.0.0" + }, + "description": "Returns true if an object was created by the `Object` constructor.", + "devDependencies": { + "chai": "^4.2.0", + "esm": "^3.2.22", + "gulp-format-md": "^1.0.0", + "mocha": "^6.1.4", + "mocha-headless-chrome": "^2.0.2", + "rollup": "^1.10.1", + "rollup-plugin-node-resolve": "^4.2.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.js", + "index.cjs.js" + ], + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "is-plain-object", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-plain-object.git" + }, + "scripts": { + "build": "rollup -c", + "prepare": "rollup -c", + "test": "npm run test_node && npm run build && npm run test_browser", + "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", + "test_node": "mocha -r esm" + }, + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "3.0.0" +} diff --git a/node_modules/@octokit/request/node_modules/isobject/LICENSE b/node_modules/@octokit/request/node_modules/isobject/LICENSE new file mode 100644 index 00000000..943e71d0 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/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. \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/isobject/README.md b/node_modules/@octokit/request/node_modules/isobject/README.md new file mode 100644 index 00000000..1c6e21fa --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/README.md @@ -0,0 +1,127 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) + +> Returns true if the value is an object and not an array or 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 isobject +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` + +## Usage + +```js +import isObject from 'isobject'; +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## 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: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [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.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 30 | [jonschlinkert](https://github.com/jonschlinkert) | +| 8 | [doowb](https://github.com/doowb) | +| 7 | [TrySound](https://github.com/TrySound) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [LeSuisse](https://github.com/LeSuisse) | +| 1 | [tmcw](https://github.com/tmcw) | +| 1 | [ZhouHansen](https://github.com/ZhouHansen) | + +### 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._ \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/isobject/index.cjs.js b/node_modules/@octokit/request/node_modules/isobject/index.cjs.js new file mode 100644 index 00000000..49debe73 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/index.cjs.js @@ -0,0 +1,14 @@ +'use strict'; + +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} + +module.exports = isObject; diff --git a/node_modules/@octokit/request/node_modules/isobject/index.d.ts b/node_modules/@octokit/request/node_modules/isobject/index.d.ts new file mode 100644 index 00000000..c471c715 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/index.d.ts @@ -0,0 +1,3 @@ +declare function isObject(val: any): boolean; + +export default isObject; diff --git a/node_modules/@octokit/request/node_modules/isobject/index.js b/node_modules/@octokit/request/node_modules/isobject/index.js new file mode 100644 index 00000000..e9f03822 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/index.js @@ -0,0 +1,10 @@ +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +export default function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; diff --git a/node_modules/@octokit/request/node_modules/isobject/package.json b/node_modules/@octokit/request/node_modules/isobject/package.json new file mode 100644 index 00000000..97768633 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/package.json @@ -0,0 +1,128 @@ +{ + "_args": [ + [ + "isobject@4.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "isobject@4.0.0", + "_id": "isobject@4.0.0", + "_inBundle": false, + "_integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "_location": "/@octokit/request/isobject", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isobject@4.0.0", + "name": "isobject", + "escapedName": "isobject", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/@octokit/request/is-plain-object" + ], + "_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "contributors": [ + { + "url": "https://github.com/LeSuisse" + }, + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Magnús Dæhlen", + "url": "https://github.com/magnudae" + }, + { + "name": "Tom MacWright", + "url": "https://macwright.org" + } + ], + "dependencies": {}, + "description": "Returns true if the value is an object and not an array or null.", + "devDependencies": { + "esm": "^3.2.22", + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5", + "rollup": "^1.10.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.cjs.js", + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/isobject", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "isobject", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/isobject.git" + }, + "scripts": { + "build": "rollup -i index.js -o index.cjs.js -f cjs", + "prepublish": "npm run build", + "test": "mocha -r esm" + }, + "types": "index.d.ts", + "verb": { + "related": { + "list": [ + "extend-shallow", + "is-plain-object", + "kind-of", + "merge-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "4.0.0" +} diff --git a/node_modules/@octokit/request/node_modules/node-fetch/CHANGELOG.md b/node_modules/@octokit/request/node_modules/node-fetch/CHANGELOG.md new file mode 100644 index 00000000..188fcd39 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/node-fetch/CHANGELOG.md @@ -0,0 +1,266 @@ + +Changelog +========= + + +# 2.x release + +## v2.6.0 + +- Enhance: `options.agent`, it now accepts a function that returns custom http(s).Agent instance based on current URL, see readme for more information. +- Fix: incorrect `Content-Length` was returned for stream body in 2.5.0 release; note that `node-fetch` doesn't calculate content length for stream body. +- Fix: `Response.url` should return empty string instead of `null` by default. + +## v2.5.0 + +- Enhance: `Response` object now includes `redirected` property. +- Enhance: `fetch()` now accepts third-party `Blob` implementation as body. +- Other: disable `package-lock.json` generation as we never commit them. +- Other: dev dependency update. +- Other: readme update. + +## v2.4.1 + +- Fix: `Blob` import rule for node < 10, as `Readable` isn't a named export. + +## v2.4.0 + +- Enhance: added `Brotli` compression support (using node's zlib). +- Enhance: updated `Blob` implementation per spec. +- Fix: set content type automatically for `URLSearchParams`. +- Fix: `Headers` now reject empty header names. +- Fix: test cases, as node 12+ no longer accepts invalid header response. + +## v2.3.0 + +- Enhance: added `AbortSignal` support, with README example. +- Enhance: handle invalid `Location` header during redirect by rejecting them explicitly with `FetchError`. +- Fix: update `browser.js` to support react-native environment, where `self` isn't available globally. + +## v2.2.1 + +- Fix: `compress` flag shouldn't overwrite existing `Accept-Encoding` header. +- Fix: multiple `import` rules, where `PassThrough` etc. doesn't have a named export when using node <10 and `--exerimental-modules` flag. +- Other: Better README. + +## v2.2.0 + +- Enhance: Support all `ArrayBuffer` view types +- Enhance: Support Web Workers +- Enhance: Support Node.js' `--experimental-modules` mode; deprecate `.es.js` file +- Fix: Add `__esModule` property to the exports object +- Other: Better example in README for writing response to a file +- Other: More tests for Agent + +## v2.1.2 + +- Fix: allow `Body` methods to work on `ArrayBuffer`-backed `Body` objects +- Fix: reject promise returned by `Body` methods when the accumulated `Buffer` exceeds the maximum size +- Fix: support custom `Host` headers with any casing +- Fix: support importing `fetch()` from TypeScript in `browser.js` +- Fix: handle the redirect response body properly + +## v2.1.1 + +Fix packaging errors in v2.1.0. + +## v2.1.0 + +- Enhance: allow using ArrayBuffer as the `body` of a `fetch()` or `Request` +- Fix: store HTTP headers of a `Headers` object internally with the given case, for compatibility with older servers that incorrectly treated header names in a case-sensitive manner +- Fix: silently ignore invalid HTTP headers +- Fix: handle HTTP redirect responses without a `Location` header just like non-redirect responses +- Fix: include bodies when following a redirection when appropriate + +## v2.0.0 + +This is a major release. Check [our upgrade guide](https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md) for an overview on some key differences between v1 and v2. + +### General changes + +- Major: Node.js 0.10.x and 0.12.x support is dropped +- Major: `require('node-fetch/lib/response')` etc. is now unsupported; use `require('node-fetch').Response` or ES6 module imports +- Enhance: start testing on Node.js v4.x, v6.x, v8.x LTS, as well as v9.x stable +- Enhance: use Rollup to produce a distributed bundle (less memory overhead and faster startup) +- Enhance: make `Object.prototype.toString()` on Headers, Requests, and Responses return correct class strings +- Other: rewrite in ES2015 using Babel +- Other: use Codecov for code coverage tracking +- Other: update package.json script for npm 5 +- Other: `encoding` module is now optional (alpha.7) +- Other: expose browser.js through package.json, avoid bundling mishaps (alpha.9) +- Other: allow TypeScript to `import` node-fetch by exposing default (alpha.9) + +### HTTP requests + +- Major: overwrite user's `Content-Length` if we can be sure our information is correct (per spec) +- Fix: errors in a response are caught before the body is accessed +- Fix: support WHATWG URL objects, created by `whatwg-url` package or `require('url').URL` in Node.js 7+ + +### Response and Request classes + +- Major: `response.text()` no longer attempts to detect encoding, instead always opting for UTF-8 (per spec); use `response.textConverted()` for the v1 behavior +- Major: make `response.json()` throw error instead of returning an empty object on 204 no-content respose (per spec; reverts behavior changed in v1.6.2) +- Major: internal methods are no longer exposed +- Major: throw error when a `GET` or `HEAD` Request is constructed with a non-null body (per spec) +- Enhance: add `response.arrayBuffer()` (also applies to Requests) +- Enhance: add experimental `response.blob()` (also applies to Requests) +- Enhance: `URLSearchParams` is now accepted as a body +- Enhance: wrap `response.json()` json parsing error as `FetchError` +- Fix: fix Request and Response with `null` body + +### Headers class + +- Major: remove `headers.getAll()`; make `get()` return all headers delimited by commas (per spec) +- Enhance: make Headers iterable +- Enhance: make Headers constructor accept an array of tuples +- Enhance: make sure header names and values are valid in HTTP +- Fix: coerce Headers prototype function parameters to strings, where applicable + +### Documentation + +- Enhance: more comprehensive API docs +- Enhance: add a list of default headers in README + + +# 1.x release + +## backport releases (v1.7.0 and beyond) + +See [changelog on 1.x branch](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) for details. + +## v1.6.3 + +- Enhance: error handling document to explain `FetchError` design +- Fix: support `form-data` 2.x releases (requires `form-data` >= 2.1.0) + +## v1.6.2 + +- Enhance: minor document update +- Fix: response.json() returns empty object on 204 no-content response instead of throwing a syntax error + +## v1.6.1 + +- Fix: if `res.body` is a non-stream non-formdata object, we will call `body.toString` and send it as a string +- Fix: `counter` value is incorrectly set to `follow` value when wrapping Request instance +- Fix: documentation update + +## v1.6.0 + +- Enhance: added `res.buffer()` api for convenience, it returns body as a Node.js buffer +- Enhance: better old server support by handling raw deflate response +- Enhance: skip encoding detection for non-HTML/XML response +- Enhance: minor document update +- Fix: HEAD request doesn't need decompression, as body is empty +- Fix: `req.body` now accepts a Node.js buffer + +## v1.5.3 + +- Fix: handle 204 and 304 responses when body is empty but content-encoding is gzip/deflate +- Fix: allow resolving response and cloned response in any order +- Fix: avoid setting `content-length` when `form-data` body use streams +- Fix: send DELETE request with content-length when body is present +- Fix: allow any url when calling new Request, but still reject non-http(s) url in fetch + +## v1.5.2 + +- Fix: allow node.js core to handle keep-alive connection pool when passing a custom agent + +## v1.5.1 + +- Fix: redirect mode `manual` should work even when there is no redirection or broken redirection + +## v1.5.0 + +- Enhance: rejected promise now use custom `Error` (thx to @pekeler) +- Enhance: `FetchError` contains `err.type` and `err.code`, allows for better error handling (thx to @pekeler) +- Enhance: basic support for redirect mode `manual` and `error`, allows for location header extraction (thx to @jimmywarting for the initial PR) + +## v1.4.1 + +- Fix: wrapping Request instance with FormData body again should preserve the body as-is + +## v1.4.0 + +- Enhance: Request and Response now have `clone` method (thx to @kirill-konshin for the initial PR) +- Enhance: Request and Response now have proper string and buffer body support (thx to @kirill-konshin) +- Enhance: Body constructor has been refactored out (thx to @kirill-konshin) +- Enhance: Headers now has `forEach` method (thx to @tricoder42) +- Enhance: back to 100% code coverage +- Fix: better form-data support (thx to @item4) +- Fix: better character encoding detection under chunked encoding (thx to @dsuket for the initial PR) + +## v1.3.3 + +- Fix: make sure `Content-Length` header is set when body is string for POST/PUT/PATCH requests +- Fix: handle body stream error, for cases such as incorrect `Content-Encoding` header +- Fix: when following certain redirects, use `GET` on subsequent request per Fetch Spec +- Fix: `Request` and `Response` constructors now parse headers input using `Headers` + +## v1.3.2 + +- Enhance: allow auto detect of form-data input (no `FormData` spec on node.js, this is form-data specific feature) + +## v1.3.1 + +- Enhance: allow custom host header to be set (server-side only feature, as it's a forbidden header on client-side) + +## v1.3.0 + +- Enhance: now `fetch.Request` is exposed as well + +## v1.2.1 + +- Enhance: `Headers` now normalized `Number` value to `String`, prevent common mistakes + +## v1.2.0 + +- Enhance: now fetch.Headers and fetch.Response are exposed, making testing easier + +## v1.1.2 + +- Fix: `Headers` should only support `String` and `Array` properties, and ignore others + +## v1.1.1 + +- Enhance: now req.headers accept both plain object and `Headers` instance + +## v1.1.0 + +- Enhance: timeout now also applies to response body (in case of slow response) +- Fix: timeout is now cleared properly when fetch is done/has failed + +## v1.0.6 + +- Fix: less greedy content-type charset matching + +## v1.0.5 + +- Fix: when `follow = 0`, fetch should not follow redirect +- Enhance: update tests for better coverage +- Enhance: code formatting +- Enhance: clean up doc + +## v1.0.4 + +- Enhance: test iojs support +- Enhance: timeout attached to socket event only fire once per redirect + +## v1.0.3 + +- Fix: response size limit should reject large chunk +- Enhance: added character encoding detection for xml, such as rss/atom feed (encoding in DTD) + +## v1.0.2 + +- Fix: added res.ok per spec change + +## v1.0.0 + +- Enhance: better test coverage and doc + + +# 0.x release + +## v0.1 + +- Major: initial public release diff --git a/node_modules/@octokit/request/node_modules/node-fetch/LICENSE.md b/node_modules/@octokit/request/node_modules/node-fetch/LICENSE.md new file mode 100644 index 00000000..660ffecb --- /dev/null +++ b/node_modules/@octokit/request/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/@octokit/request/node_modules/node-fetch/README.md b/node_modules/@octokit/request/node_modules/node-fetch/README.md new file mode 100644 index 00000000..cb199012 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/node-fetch/README.md @@ -0,0 +1,583 @@ +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] + +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)) + + + +- [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 --save +``` + +## Loading and configuring the module +We suggest you load the module via `require`, pending the stabalizing 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 `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. + +Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, like 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 only cancel streamed requests 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 follows: + +```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 that's out of the scope of Fetch. Including and not limit to: + +- 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, `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] + +The data 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 spec, 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 on 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 +[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/@octokit/request/node_modules/node-fetch/browser.js b/node_modules/@octokit/request/node_modules/node-fetch/browser.js new file mode 100644 index 00000000..0ad5de00 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/node-fetch/browser.js @@ -0,0 +1,23 @@ +"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. +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/@octokit/request/node_modules/node-fetch/lib/index.es.js b/node_modules/@octokit/request/node_modules/node-fetch/lib/index.es.js new file mode 100644 index 00000000..37d022c9 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/node-fetch/lib/index.es.js @@ -0,0 +1,1633 @@ +process.emitWarning("The .es.js file is deprecated. Use .mjs instead."); + +import Stream from 'stream'; +import http from 'http'; +import Url from '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'); + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +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 = parse_url(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parse_url(`${input}`); + } + input = {}; + } else { + parsedURL = parse_url(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'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * 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 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`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 + }; + + // 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/@octokit/request/node_modules/node-fetch/lib/index.js b/node_modules/@octokit/request/node_modules/node-fetch/lib/index.js new file mode 100644 index 00000000..daa44bca --- /dev/null +++ b/node_modules/@octokit/request/node_modules/node-fetch/lib/index.js @@ -0,0 +1,1642 @@ +'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 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'); + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +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 = parse_url(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parse_url(`${input}`); + } + input = {}; + } else { + parsedURL = parse_url(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'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * 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 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`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 + }; + + // 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/@octokit/request/node_modules/node-fetch/lib/index.mjs b/node_modules/@octokit/request/node_modules/node-fetch/lib/index.mjs new file mode 100644 index 00000000..e571ea69 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/node-fetch/lib/index.mjs @@ -0,0 +1,1631 @@ +import Stream from 'stream'; +import http from 'http'; +import Url from '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'); + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +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 = parse_url(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parse_url(`${input}`); + } + input = {}; + } else { + parsedURL = parse_url(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'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * 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 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`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 + }; + + // 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/@octokit/request/node_modules/node-fetch/package.json b/node_modules/@octokit/request/node_modules/node-fetch/package.json new file mode 100644 index 00000000..e998800e --- /dev/null +++ b/node_modules/@octokit/request/node_modules/node-fetch/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "node-fetch@2.6.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "node-fetch@2.6.0", + "_id": "node-fetch@2.6.0", + "_inBundle": false, + "_integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "_location": "/@octokit/request/node-fetch", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "node-fetch@2.6.0", + "name": "node-fetch", + "escapedName": "node-fetch", + "rawSpec": "2.6.0", + "saveSpec": null, + "fetchSpec": "2.6.0" + }, + "_requiredBy": [ + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "_spec": "2.6.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "David Frank" + }, + "browser": "./browser.js", + "bugs": { + "url": "https://github.com/bitinn/node-fetch/issues" + }, + "dependencies": {}, + "description": "A light-weight module that brings window.fetch to node.js", + "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", + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "files": [ + "lib/index.js", + "lib/index.mjs", + "lib/index.es.js", + "browser.js" + ], + "homepage": "https://github.com/bitinn/node-fetch", + "keywords": [ + "fetch", + "http", + "promise" + ], + "license": "MIT", + "main": "lib/index", + "module": "lib/index.mjs", + "name": "node-fetch", + "repository": { + "type": "git", + "url": "git+https://github.com/bitinn/node-fetch.git" + }, + "scripts": { + "build": "cross-env BABEL_ENV=rollup rollup -c", + "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json", + "prepare": "npm run build", + "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js", + "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js" + }, + "version": "2.6.0" +} diff --git a/node_modules/@octokit/request/package.json b/node_modules/@octokit/request/package.json new file mode 100644 index 00000000..9ecb8ff8 --- /dev/null +++ b/node_modules/@octokit/request/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + "@octokit/request@5.3.1", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@octokit/request@5.3.1", + "_id": "@octokit/request@5.3.1", + "_inBundle": false, + "_integrity": "sha512-5/X0AL1ZgoU32fAepTfEoggFinO3rxsMLtzhlUX+RctLrusn/CApJuGFCd0v7GMFhF+8UiCsTTfsu7Fh1HnEJg==", + "_location": "/@octokit/request", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/request@5.3.1", + "name": "@octokit/request", + "escapedName": "@octokit%2frequest", + "scope": "@octokit", + "rawSpec": "5.3.1", + "saveSpec": null, + "fetchSpec": "5.3.1" + }, + "_requiredBy": [ + "/@octokit/graphql", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.3.1.tgz", + "_spec": "5.3.1", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/octokit/request.js/issues" + }, + "deno": "dist-web/index.js", + "dependencies": { + "@octokit/endpoint": "^5.5.0", + "@octokit/request-error": "^1.0.1", + "@octokit/types": "^2.0.0", + "deprecation": "^2.0.0", + "is-plain-object": "^3.0.0", + "node-fetch": "^2.3.0", + "once": "^1.4.0", + "universal-user-agent": "^4.0.0" + }, + "description": "Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node", + "devDependencies": { + "@octokit/auth-app": "^2.1.2", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.7.0", + "@pika/plugin-build-web": "^0.7.0", + "@pika/plugin-ts-standard-pkg": "^0.7.0", + "@types/fetch-mock": "^7.2.4", + "@types/jest": "^24.0.12", + "@types/lolex": "^3.1.1", + "@types/node": "^12.0.3", + "@types/node-fetch": "^2.3.3", + "@types/once": "^1.4.0", + "fetch-mock": "^7.2.0", + "jest": "^24.7.1", + "lolex": "^5.0.0", + "prettier": "^1.17.0", + "semantic-release": "^15.13.27", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^24.0.2", + "typescript": "^3.4.5" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/request.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "license": "MIT", + "main": "dist-node/index.js", + "name": "@octokit/request", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/request.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "5.3.1" +} diff --git a/node_modules/@octokit/rest/LICENSE b/node_modules/@octokit/rest/LICENSE new file mode 100644 index 00000000..4c0d268a --- /dev/null +++ b/node_modules/@octokit/rest/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer) +Copyright (c) 2017-2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/rest/README.md b/node_modules/@octokit/rest/README.md new file mode 100644 index 00000000..2a318248 --- /dev/null +++ b/node_modules/@octokit/rest/README.md @@ -0,0 +1,46 @@ +# rest.js + +> GitHub REST API client for JavaScript + +[![@latest](https://img.shields.io/npm/v/@octokit/rest.svg)](https://www.npmjs.com/package/@octokit/rest) +![Build Status](https://github.com/octokit/rest.js/workflows/Test/badge.svg) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/rest.js.svg)](https://greenkeeper.io/) + +## Installation + +```shell +npm install @octokit/rest +``` + +## Usage + +```js +const Octokit = require("@octokit/rest"); +const octokit = new Octokit(); + +// Compare: https://developer.github.com/v3/repos/#list-organization-repositories +octokit.repos + .listForOrg({ + org: "octokit", + type: "public" + }) + .then(({ data }) => { + // handle data + }); +``` + +See https://octokit.github.io/rest.js/ for full documentation. + +## Contributing + +We would love you to contribute to `@octokit/rest`, pull requests are very welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information. + +## Credits + +`@octokit/rest` was originally created as [`node-github`](https://www.npmjs.com/package/github) in 2012 by Mike de Boer from Cloud9 IDE, Inc. + +It was adopted and renamed by GitHub in 2017 + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/rest/index.d.ts b/node_modules/@octokit/rest/index.d.ts new file mode 100644 index 00000000..b1a7dcb2 --- /dev/null +++ b/node_modules/@octokit/rest/index.d.ts @@ -0,0 +1,40793 @@ +/** + * This file is generated based on https://github.com/octokit/routes/ & "npm run build:ts". + * + * DO NOT EDIT MANUALLY. + */ + +/** + * This declaration file requires TypeScript 3.1 or above. + */ + +/// + +import * as http from "http"; + +declare namespace Octokit { + type json = any; + type date = string; + + export interface Static { + plugin(plugin: Plugin): Static; + new (options?: Octokit.Options): Octokit; + } + + export interface Response { + /** This is the data you would see in https://developer.github.com/v3/ */ + data: T; + + /** Response status number */ + status: number; + + /** Response headers */ + headers: { + date: string; + "x-ratelimit-limit": string; + "x-ratelimit-remaining": string; + "x-ratelimit-reset": string; + "x-Octokit-request-id": string; + "x-Octokit-media-type": string; + link: string; + "last-modified": string; + etag: string; + status: string; + }; + + [Symbol.iterator](): Iterator; + } + + export type AnyResponse = Response; + + export interface EmptyParams {} + + export interface Options { + authStrategy?: any; + auth?: + | string + | { username: string; password: string; on2fa: () => Promise } + | { clientId: string; clientSecret: string } + | { (): string | Promise }; + userAgent?: string; + previews?: string[]; + baseUrl?: string; + log?: { + debug?: (message: string, info?: object) => void; + info?: (message: string, info?: object) => void; + warn?: (message: string, info?: object) => void; + error?: (message: string, info?: object) => void; + }; + request?: { + agent?: http.Agent; + timeout?: number; + }; + /** + * @deprecated Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request + */ + timeout?: number; + /** + * @deprecated Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request + */ + headers?: { [header: string]: any }; + /** + * @deprecated Use {request: {agent}} instead. See https://github.com/octokit/request.js#request + */ + agent?: http.Agent; + [option: string]: any; + } + + export type RequestMethod = + | "DELETE" + | "GET" + | "HEAD" + | "PATCH" + | "POST" + | "PUT"; + + export interface EndpointOptions { + baseUrl?: string; + method?: RequestMethod; + url?: string; + headers?: { [header: string]: any }; + data?: any; + request?: { [option: string]: any }; + [parameter: string]: any; + } + + export interface RequestOptions { + method?: RequestMethod; + url?: string; + headers?: RequestHeaders; + body?: any; + request?: OctokitRequestOptions; + /** + * 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[]; + }; + } + + export type RequestHeaders = { + /** + * Avoid setting `accept`, use `mediaFormat.{format|previews}` 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; + }; + + export type OctokitRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + */ + agent?: http.Agent; + /** + * Custom replacement for built-in fetch method. Useful for testing or request hooks. + */ + fetch?: any; + /** + * Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests. + */ + signal?: any; + /** + * 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; + }; + + export interface Log { + debug: (message: string, additionalInfo?: object) => void; + info: (message: string, additionalInfo?: object) => void; + warn: (message: string, additionalInfo?: object) => void; + error: (message: string, additionalInfo?: object) => void; + } + + export interface Endpoint { + ( + Route: string, + EndpointOptions?: Octokit.EndpointOptions + ): Octokit.RequestOptions; + (EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; + /** + * Current default options + */ + DEFAULTS: Octokit.EndpointOptions; + /** + * Get the defaulted endpoint options, but without parsing them into request options: + */ + merge( + Route: string, + EndpointOptions?: Octokit.EndpointOptions + ): Octokit.RequestOptions; + merge(EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; + /** + * Stateless method to turn endpoint options into request options. Calling endpoint(options) is the same as calling endpoint.parse(endpoint.merge(options)). + */ + parse(EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; + /** + * Merges existing defaults with passed options and returns new endpoint() method with new defaults + */ + defaults(EndpointOptions: Octokit.EndpointOptions): Octokit.Endpoint; + } + + export interface Request { + (Route: string, EndpointOptions?: Octokit.EndpointOptions): Promise< + Octokit.AnyResponse + >; + (EndpointOptions: Octokit.EndpointOptions): Promise; + endpoint: Octokit.Endpoint; + } + + export interface AuthBasic { + type: "basic"; + username: string; + password: string; + } + + export interface AuthOAuthToken { + type: "oauth"; + token: string; + } + + export interface AuthOAuthSecret { + type: "oauth"; + key: string; + secret: string; + } + + export interface AuthUserToken { + type: "token"; + token: string; + } + + export interface AuthJWT { + type: "app"; + token: string; + } + + export type Link = { link: string } | { headers: { link: string } } | string; + + export interface Callback { + (error: Error | null, result: T): any; + } + + export type Plugin = (octokit: Octokit, options: Octokit.Options) => void; + + // See https://github.com/octokit/request.js#request + export type HookOptions = { + baseUrl: string; + headers: { [header: string]: string }; + method: string; + url: string; + data: any; + // See https://github.com/bitinn/node-fetch#options + request: { + follow?: number; + timeout?: number; + compress?: boolean; + size?: number; + agent?: string | null; + }; + [index: string]: any; + }; + + export type HookError = Error & { + status: number; + headers: { [header: string]: string }; + documentation_url?: string; + errors?: [ + { + resource: string; + field: string; + code: string; + } + ]; + }; + + export interface Paginate { + ( + Route: string, + EndpointOptions?: Octokit.EndpointOptions, + callback?: (response: Octokit.AnyResponse, done: () => void) => any + ): Promise; + ( + EndpointOptions: Octokit.EndpointOptions, + callback?: (response: Octokit.AnyResponse, done: () => void) => any + ): Promise; + iterator: ( + EndpointOptions: Octokit.EndpointOptions + ) => AsyncIterableIterator; + } + + // response types + type UsersUpdateAuthenticatedResponsePlan = { + collaborators: number; + name: string; + private_repos: number; + space: number; + }; + type UsersUpdateAuthenticatedResponse = { + avatar_url: string; + bio: string; + blog: string; + collaborators: number; + company: string; + created_at: string; + disk_usage: number; + email: string; + events_url: string; + followers: number; + followers_url: string; + following: number; + following_url: string; + gists_url: string; + gravatar_id: string; + hireable: boolean; + html_url: string; + id: number; + location: string; + login: string; + name: string; + node_id: string; + organizations_url: string; + owned_private_repos: number; + plan: UsersUpdateAuthenticatedResponsePlan; + private_gists: number; + public_gists: number; + public_repos: number; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + total_private_repos: number; + two_factor_authentication: boolean; + type: string; + updated_at: string; + url: string; + }; + type UsersTogglePrimaryEmailVisibilityResponseItem = { + email: string; + primary: boolean; + verified: boolean; + visibility: string; + }; + type UsersListPublicKeysForUserResponseItem = { id: number; key: string }; + type UsersListPublicKeysResponseItem = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type UsersListPublicEmailsResponseItem = { + email: string; + primary: boolean; + verified: boolean; + visibility: string; + }; + type UsersListGpgKeysForUserResponseItemSubkeysItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: number; + public_key: string; + subkeys: Array; + }; + type UsersListGpgKeysForUserResponseItemEmailsItem = { + email: string; + verified: boolean; + }; + type UsersListGpgKeysForUserResponseItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: null; + public_key: string; + subkeys: Array; + }; + type UsersListGpgKeysResponseItemSubkeysItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: number; + public_key: string; + subkeys: Array; + }; + type UsersListGpgKeysResponseItemEmailsItem = { + email: string; + verified: boolean; + }; + type UsersListGpgKeysResponseItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: null; + public_key: string; + subkeys: Array; + }; + type UsersListFollowingForUserResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersListFollowingForAuthenticatedUserResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersListFollowersForUserResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersListFollowersForAuthenticatedUserResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersListEmailsResponseItem = { + email: string; + primary: boolean; + verified: boolean; + visibility: string; + }; + type UsersListBlockedResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersListResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersGetPublicKeyResponse = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type UsersGetGpgKeyResponseSubkeysItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: number; + public_key: string; + subkeys: Array; + }; + type UsersGetGpgKeyResponseEmailsItem = { email: string; verified: boolean }; + type UsersGetGpgKeyResponse = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: null; + public_key: string; + subkeys: Array; + }; + type UsersGetContextForUserResponseContextsItem = { + message: string; + octicon: string; + }; + type UsersGetContextForUserResponse = { + contexts: Array; + }; + type UsersGetByUsernameResponsePlan = { + collaborators: number; + name: string; + private_repos: number; + space: number; + }; + type UsersGetByUsernameResponse = { + avatar_url: string; + bio: string; + blog: string; + company: string; + created_at: string; + email: string; + events_url: string; + followers: number; + followers_url: string; + following: number; + following_url: string; + gists_url: string; + gravatar_id: string; + hireable: boolean; + html_url: string; + id: number; + location: string; + login: string; + name: string; + node_id: string; + organizations_url: string; + public_gists: number; + public_repos: number; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + updated_at: string; + url: string; + plan?: UsersGetByUsernameResponsePlan; + }; + type UsersGetAuthenticatedResponsePlan = { + collaborators: number; + name: string; + private_repos: number; + space: number; + }; + type UsersGetAuthenticatedResponse = { + avatar_url: string; + bio: string; + blog: string; + collaborators?: number; + company: string; + created_at: string; + disk_usage?: number; + email: string; + events_url: string; + followers: number; + followers_url: string; + following: number; + following_url: string; + gists_url: string; + gravatar_id: string; + hireable: boolean; + html_url: string; + id: number; + location: string; + login: string; + name: string; + node_id: string; + organizations_url: string; + owned_private_repos?: number; + plan?: UsersGetAuthenticatedResponsePlan; + private_gists?: number; + public_gists: number; + public_repos: number; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + total_private_repos?: number; + two_factor_authentication?: boolean; + type: string; + updated_at: string; + url: string; + }; + type UsersCreatePublicKeyResponse = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type UsersCreateGpgKeyResponseSubkeysItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: number; + public_key: string; + subkeys: Array; + }; + type UsersCreateGpgKeyResponseEmailsItem = { + email: string; + verified: boolean; + }; + type UsersCreateGpgKeyResponse = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: null; + public_key: string; + subkeys: Array; + }; + type UsersAddEmailsResponseItem = { + email: string; + primary: boolean; + verified: boolean; + visibility: string | null; + }; + type TeamsUpdateLegacyResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsUpdateLegacyResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsUpdateLegacyResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsUpdateInOrgResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsUpdateInOrgResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsUpdateInOrgResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsUpdateDiscussionLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsUpdateDiscussionLegacyResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsUpdateDiscussionLegacyResponse = { + author: TeamsUpdateDiscussionLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsUpdateDiscussionLegacyResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsUpdateDiscussionInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsUpdateDiscussionInOrgResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsUpdateDiscussionInOrgResponse = { + author: TeamsUpdateDiscussionInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsUpdateDiscussionInOrgResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsUpdateDiscussionCommentLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsUpdateDiscussionCommentLegacyResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsUpdateDiscussionCommentLegacyResponse = { + author: TeamsUpdateDiscussionCommentLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + reactions: TeamsUpdateDiscussionCommentLegacyResponseReactions; + updated_at: string; + url: string; + }; + type TeamsUpdateDiscussionCommentInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsUpdateDiscussionCommentInOrgResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsUpdateDiscussionCommentInOrgResponse = { + author: TeamsUpdateDiscussionCommentInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + reactions: TeamsUpdateDiscussionCommentInOrgResponseReactions; + updated_at: string; + url: string; + }; + type TeamsUpdateDiscussionCommentResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsUpdateDiscussionCommentResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsUpdateDiscussionCommentResponse = { + author: TeamsUpdateDiscussionCommentResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + reactions: TeamsUpdateDiscussionCommentResponseReactions; + updated_at: string; + url: string; + }; + type TeamsUpdateDiscussionResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsUpdateDiscussionResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsUpdateDiscussionResponse = { + author: TeamsUpdateDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsUpdateDiscussionResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsUpdateResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsUpdateResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsUpdateResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsReviewProjectLegacyResponsePermissions = { + admin: boolean; + read: boolean; + write: boolean; + }; + type TeamsReviewProjectLegacyResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsReviewProjectLegacyResponse = { + body: string; + columns_url: string; + created_at: string; + creator: TeamsReviewProjectLegacyResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsReviewProjectLegacyResponsePermissions; + private: boolean; + state: string; + updated_at: string; + url: string; + }; + type TeamsReviewProjectInOrgResponsePermissions = { + admin: boolean; + read: boolean; + write: boolean; + }; + type TeamsReviewProjectInOrgResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsReviewProjectInOrgResponse = { + body: string; + columns_url: string; + created_at: string; + creator: TeamsReviewProjectInOrgResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsReviewProjectInOrgResponsePermissions; + private: boolean; + state: string; + updated_at: string; + url: string; + }; + type TeamsReviewProjectResponsePermissions = { + admin: boolean; + read: boolean; + write: boolean; + }; + type TeamsReviewProjectResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsReviewProjectResponse = { + body: string; + columns_url: string; + created_at: string; + creator: TeamsReviewProjectResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsReviewProjectResponsePermissions; + private: boolean; + state: string; + updated_at: string; + url: string; + }; + type TeamsListReposLegacyResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type TeamsListReposLegacyResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListReposLegacyResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type TeamsListReposLegacyResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: TeamsListReposLegacyResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: TeamsListReposLegacyResponseItemOwner; + permissions: TeamsListReposLegacyResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type TeamsListReposInOrgResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type TeamsListReposInOrgResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListReposInOrgResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type TeamsListReposInOrgResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: TeamsListReposInOrgResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: TeamsListReposInOrgResponseItemOwner; + permissions: TeamsListReposInOrgResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type TeamsListReposResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type TeamsListReposResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListReposResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type TeamsListReposResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: TeamsListReposResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: TeamsListReposResponseItemOwner; + permissions: TeamsListReposResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type TeamsListProjectsLegacyResponseItemPermissions = { + admin: boolean; + read: boolean; + write: boolean; + }; + type TeamsListProjectsLegacyResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListProjectsLegacyResponseItem = { + body: string; + columns_url: string; + created_at: string; + creator: TeamsListProjectsLegacyResponseItemCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsListProjectsLegacyResponseItemPermissions; + private: boolean; + state: string; + updated_at: string; + url: string; + }; + type TeamsListProjectsInOrgResponseItemPermissions = { + admin: boolean; + read: boolean; + write: boolean; + }; + type TeamsListProjectsInOrgResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListProjectsInOrgResponseItem = { + body: string; + columns_url: string; + created_at: string; + creator: TeamsListProjectsInOrgResponseItemCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsListProjectsInOrgResponseItemPermissions; + private: boolean; + state: string; + updated_at: string; + url: string; + }; + type TeamsListProjectsResponseItemPermissions = { + admin: boolean; + read: boolean; + write: boolean; + }; + type TeamsListProjectsResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListProjectsResponseItem = { + body: string; + columns_url: string; + created_at: string; + creator: TeamsListProjectsResponseItemCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsListProjectsResponseItemPermissions; + private: boolean; + state: string; + updated_at: string; + url: string; + }; + type TeamsListPendingInvitationsLegacyResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListPendingInvitationsLegacyResponseItem = { + created_at: string; + email: string; + id: number; + invitation_team_url: string; + inviter: TeamsListPendingInvitationsLegacyResponseItemInviter; + login: string; + role: string; + team_count: number; + }; + type TeamsListPendingInvitationsInOrgResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListPendingInvitationsInOrgResponseItem = { + created_at: string; + email: string; + id: number; + invitation_team_url: string; + inviter: TeamsListPendingInvitationsInOrgResponseItemInviter; + login: string; + role: string; + team_count: number; + }; + type TeamsListPendingInvitationsResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListPendingInvitationsResponseItem = { + created_at: string; + email: string; + id: number; + invitation_team_url: string; + inviter: TeamsListPendingInvitationsResponseItemInviter; + login: string; + role: string; + team_count: number; + }; + type TeamsListMembersLegacyResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListMembersInOrgResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListMembersResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListForAuthenticatedUserResponseItemOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsListForAuthenticatedUserResponseItem = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsListForAuthenticatedUserResponseItemOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsListDiscussionsLegacyResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsListDiscussionsLegacyResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListDiscussionsLegacyResponseItem = { + author: TeamsListDiscussionsLegacyResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsListDiscussionsLegacyResponseItemReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsListDiscussionsInOrgResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsListDiscussionsInOrgResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListDiscussionsInOrgResponseItem = { + author: TeamsListDiscussionsInOrgResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsListDiscussionsInOrgResponseItemReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsListDiscussionsResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsListDiscussionsResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListDiscussionsResponseItem = { + author: TeamsListDiscussionsResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsListDiscussionsResponseItemReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsListDiscussionCommentsLegacyResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsListDiscussionCommentsLegacyResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListDiscussionCommentsLegacyResponseItem = { + author: TeamsListDiscussionCommentsLegacyResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsListDiscussionCommentsLegacyResponseItemReactions; + updated_at: string; + url: string; + }; + type TeamsListDiscussionCommentsInOrgResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsListDiscussionCommentsInOrgResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListDiscussionCommentsInOrgResponseItem = { + author: TeamsListDiscussionCommentsInOrgResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsListDiscussionCommentsInOrgResponseItemReactions; + updated_at: string; + url: string; + }; + type TeamsListDiscussionCommentsResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsListDiscussionCommentsResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListDiscussionCommentsResponseItem = { + author: TeamsListDiscussionCommentsResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsListDiscussionCommentsResponseItemReactions; + updated_at: string; + url: string; + }; + type TeamsListChildLegacyResponseItemParent = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type TeamsListChildLegacyResponseItem = { + description: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: TeamsListChildLegacyResponseItemParent; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type TeamsListChildInOrgResponseItemParent = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type TeamsListChildInOrgResponseItem = { + description: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: TeamsListChildInOrgResponseItemParent; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type TeamsListChildResponseItemParent = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type TeamsListChildResponseItem = { + description: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: TeamsListChildResponseItemParent; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type TeamsListResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type TeamsGetMembershipLegacyResponse = { + role: string; + state: string; + url: string; + }; + type TeamsGetMembershipInOrgResponse = { + role: string; + state: string; + url: string; + }; + type TeamsGetMembershipResponse = { + role: string; + state: string; + url: string; + }; + type TeamsGetLegacyResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsGetLegacyResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsGetLegacyResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsGetDiscussionLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsGetDiscussionLegacyResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsGetDiscussionLegacyResponse = { + author: TeamsGetDiscussionLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsGetDiscussionLegacyResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsGetDiscussionInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsGetDiscussionInOrgResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsGetDiscussionInOrgResponse = { + author: TeamsGetDiscussionInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsGetDiscussionInOrgResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsGetDiscussionCommentLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsGetDiscussionCommentLegacyResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsGetDiscussionCommentLegacyResponse = { + author: TeamsGetDiscussionCommentLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsGetDiscussionCommentLegacyResponseReactions; + updated_at: string; + url: string; + }; + type TeamsGetDiscussionCommentInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsGetDiscussionCommentInOrgResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsGetDiscussionCommentInOrgResponse = { + author: TeamsGetDiscussionCommentInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsGetDiscussionCommentInOrgResponseReactions; + updated_at: string; + url: string; + }; + type TeamsGetDiscussionCommentResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsGetDiscussionCommentResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsGetDiscussionCommentResponse = { + author: TeamsGetDiscussionCommentResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsGetDiscussionCommentResponseReactions; + updated_at: string; + url: string; + }; + type TeamsGetDiscussionResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsGetDiscussionResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsGetDiscussionResponse = { + author: TeamsGetDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsGetDiscussionResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsGetByNameResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsGetByNameResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsGetByNameResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsGetResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsGetResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsGetResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsCreateDiscussionLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsCreateDiscussionLegacyResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCreateDiscussionLegacyResponse = { + author: TeamsCreateDiscussionLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsCreateDiscussionLegacyResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsCreateDiscussionInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsCreateDiscussionInOrgResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCreateDiscussionInOrgResponse = { + author: TeamsCreateDiscussionInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsCreateDiscussionInOrgResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsCreateDiscussionCommentLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsCreateDiscussionCommentLegacyResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCreateDiscussionCommentLegacyResponse = { + author: TeamsCreateDiscussionCommentLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsCreateDiscussionCommentLegacyResponseReactions; + updated_at: string; + url: string; + }; + type TeamsCreateDiscussionCommentInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsCreateDiscussionCommentInOrgResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCreateDiscussionCommentInOrgResponse = { + author: TeamsCreateDiscussionCommentInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsCreateDiscussionCommentInOrgResponseReactions; + updated_at: string; + url: string; + }; + type TeamsCreateDiscussionCommentResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsCreateDiscussionCommentResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCreateDiscussionCommentResponse = { + author: TeamsCreateDiscussionCommentResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsCreateDiscussionCommentResponseReactions; + updated_at: string; + url: string; + }; + type TeamsCreateDiscussionResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsCreateDiscussionResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCreateDiscussionResponse = { + author: TeamsCreateDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsCreateDiscussionResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsCreateResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsCreateResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsCreateResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsCheckManagesRepoLegacyResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type TeamsCheckManagesRepoLegacyResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCheckManagesRepoLegacyResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: TeamsCheckManagesRepoLegacyResponseOwner; + permissions: TeamsCheckManagesRepoLegacyResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type TeamsCheckManagesRepoInOrgResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type TeamsCheckManagesRepoInOrgResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCheckManagesRepoInOrgResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: TeamsCheckManagesRepoInOrgResponseOwner; + permissions: TeamsCheckManagesRepoInOrgResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type TeamsCheckManagesRepoResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type TeamsCheckManagesRepoResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCheckManagesRepoResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: TeamsCheckManagesRepoResponseOwner; + permissions: TeamsCheckManagesRepoResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type TeamsAddOrUpdateProjectLegacyResponse = { + documentation_url: string; + message: string; + }; + type TeamsAddOrUpdateProjectInOrgResponse = { + documentation_url: string; + message: string; + }; + type TeamsAddOrUpdateProjectResponse = { + documentation_url: string; + message: string; + }; + type TeamsAddOrUpdateMembershipLegacyResponse = { + role: string; + state: string; + url: string; + }; + type TeamsAddOrUpdateMembershipInOrgResponse = { + role: string; + state: string; + url: string; + }; + type TeamsAddOrUpdateMembershipResponse = { + role: string; + state: string; + url: string; + }; + type TeamsAddMemberLegacyResponseErrorsItem = { + code: string; + field: string; + resource: string; + }; + type TeamsAddMemberLegacyResponse = { + errors: Array; + message: string; + }; + type TeamsAddMemberResponseErrorsItem = { + code: string; + field: string; + resource: string; + }; + type TeamsAddMemberResponse = { + errors: Array; + message: string; + }; + type SearchUsersLegacyResponseUsersItem = { + created: string; + created_at: string; + followers: number; + followers_count: number; + fullname: string; + gravatar_id: string; + id: string; + language: string; + location: string; + login: string; + name: string; + public_repo_count: number; + repos: number; + score: number; + type: string; + username: string; + }; + type SearchUsersLegacyResponse = { + users: Array; + }; + type SearchUsersResponseItemsItem = { + avatar_url: string; + followers_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + score: number; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchUsersResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchTopicsResponseItemsItem = { + created_at: string; + created_by: string; + curated: boolean; + description: string; + display_name: string; + featured: boolean; + name: string; + released: string; + score: number; + short_description: string; + updated_at: string; + }; + type SearchTopicsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchReposLegacyResponseRepositoriesItem = { + created: string; + created_at: string; + description: string; + followers: number; + fork: boolean; + forks: number; + has_downloads: boolean; + has_issues: boolean; + has_wiki: boolean; + homepage: string; + language: string; + name: string; + open_issues: number; + owner: string; + private: boolean; + pushed: string; + pushed_at: string; + score: number; + size: number; + type: string; + url: string; + username: string; + watchers: number; + }; + type SearchReposLegacyResponse = { + repositories: Array; + }; + type SearchReposResponseItemsItemOwner = { + avatar_url: string; + gravatar_id: string; + id: number; + login: string; + node_id: string; + received_events_url: string; + type: string; + url: string; + }; + type SearchReposResponseItemsItem = { + created_at: string; + default_branch: string; + description: string; + fork: boolean; + forks_count: number; + full_name: string; + homepage: string; + html_url: string; + id: number; + language: string; + master_branch: string; + name: string; + node_id: string; + open_issues_count: number; + owner: SearchReposResponseItemsItemOwner; + private: boolean; + pushed_at: string; + score: number; + size: number; + stargazers_count: number; + updated_at: string; + url: string; + watchers_count: number; + }; + type SearchReposResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchLabelsResponseItemsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + score: number; + url: string; + }; + type SearchLabelsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchIssuesLegacyResponseIssuesItem = { + body: string; + comments: number; + created_at: string; + gravatar_id: string; + html_url: string; + labels: Array; + number: number; + position: number; + state: string; + title: string; + updated_at: string; + user: string; + votes: number; + }; + type SearchIssuesLegacyResponse = { + issues: Array; + }; + type SearchIssuesAndPullRequestsResponseItemsItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchIssuesAndPullRequestsResponseItemsItemPullRequest = { + diff_url: null; + html_url: null; + patch_url: null; + }; + type SearchIssuesAndPullRequestsResponseItemsItemLabelsItem = { + color: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type SearchIssuesAndPullRequestsResponseItemsItem = { + assignee: null; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + milestone: null; + node_id: string; + number: number; + pull_request: SearchIssuesAndPullRequestsResponseItemsItemPullRequest; + repository_url: string; + score: number; + state: string; + title: string; + updated_at: string; + url: string; + user: SearchIssuesAndPullRequestsResponseItemsItemUser; + }; + type SearchIssuesAndPullRequestsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchIssuesResponseItemsItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchIssuesResponseItemsItemPullRequest = { + diff_url: null; + html_url: null; + patch_url: null; + }; + type SearchIssuesResponseItemsItemLabelsItem = { + color: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type SearchIssuesResponseItemsItem = { + assignee: null; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + milestone: null; + node_id: string; + number: number; + pull_request: SearchIssuesResponseItemsItemPullRequest; + repository_url: string; + score: number; + state: string; + title: string; + updated_at: string; + url: string; + user: SearchIssuesResponseItemsItemUser; + }; + type SearchIssuesResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchEmailLegacyResponseUser = { + blog: string; + company: string; + created: string; + created_at: string; + email: string; + followers_count: number; + following_count: number; + gravatar_id: string; + id: number; + location: string; + login: string; + name: string; + public_gist_count: number; + public_repo_count: number; + type: string; + }; + type SearchEmailLegacyResponse = { user: SearchEmailLegacyResponseUser }; + type SearchCommitsResponseItemsItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchCommitsResponseItemsItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + hooks_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: SearchCommitsResponseItemsItemRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type SearchCommitsResponseItemsItemParentsItem = { + html_url: string; + sha: string; + url: string; + }; + type SearchCommitsResponseItemsItemCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchCommitsResponseItemsItemCommitTree = { sha: string; url: string }; + type SearchCommitsResponseItemsItemCommitCommitter = { + date: string; + email: string; + name: string; + }; + type SearchCommitsResponseItemsItemCommitAuthor = { + date: string; + email: string; + name: string; + }; + type SearchCommitsResponseItemsItemCommit = { + author: SearchCommitsResponseItemsItemCommitAuthor; + comment_count: number; + committer: SearchCommitsResponseItemsItemCommitCommitter; + message: string; + tree: SearchCommitsResponseItemsItemCommitTree; + url: string; + }; + type SearchCommitsResponseItemsItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchCommitsResponseItemsItem = { + author: SearchCommitsResponseItemsItemAuthor; + comments_url: string; + commit: SearchCommitsResponseItemsItemCommit; + committer: SearchCommitsResponseItemsItemCommitter; + html_url: string; + parents: Array; + repository: SearchCommitsResponseItemsItemRepository; + score: number; + sha: string; + url: string; + }; + type SearchCommitsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchCodeResponseItemsItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchCodeResponseItemsItemRepository = { + 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; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + hooks_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: SearchCodeResponseItemsItemRepositoryOwner; + private: boolean; + pulls_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type SearchCodeResponseItemsItem = { + git_url: string; + html_url: string; + name: string; + path: string; + repository: SearchCodeResponseItemsItemRepository; + score: number; + sha: string; + url: string; + }; + type SearchCodeResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type ReposUploadReleaseAssetResponseValueUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUploadReleaseAssetResponseValue = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposUploadReleaseAssetResponseValueUploader; + url: string; + }; + type ReposUploadReleaseAssetResponse = { + value: ReposUploadReleaseAssetResponseValue; + }; + type ReposUpdateReleaseAssetResponseUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateReleaseAssetResponse = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposUpdateReleaseAssetResponseUploader; + url: string; + }; + type ReposUpdateReleaseResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateReleaseResponseAssetsItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateReleaseResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposUpdateReleaseResponseAssetsItemUploader; + url: string; + }; + type ReposUpdateReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposUpdateReleaseResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposUpdateProtectedBranchRequiredStatusChecksResponse = { + contexts: Array; + contexts_url: string; + strict: boolean; + url: string; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions = { + teams: Array< + ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem + >; + users_url: string; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; + }; + type ReposUpdateInvitationResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateInvitationResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposUpdateInvitationResponseRepositoryOwner; + private: boolean; + 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; + url: string; + }; + type ReposUpdateInvitationResponseInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateInvitationResponseInvitee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateInvitationResponse = { + created_at: string; + html_url: string; + id: number; + invitee: ReposUpdateInvitationResponseInvitee; + inviter: ReposUpdateInvitationResponseInviter; + permissions: string; + repository: ReposUpdateInvitationResponseRepository; + url: string; + }; + type ReposUpdateHookResponseLastResponse = { + code: null; + message: null; + status: string; + }; + type ReposUpdateHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposUpdateHookResponse = { + active: boolean; + config: ReposUpdateHookResponseConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposUpdateHookResponseLastResponse; + name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; + }; + type ReposUpdateFileResponseContentLinks = { + git: string; + html: string; + self: string; + }; + type ReposUpdateFileResponseContent = { + _links: ReposUpdateFileResponseContentLinks; + download_url: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type ReposUpdateFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposUpdateFileResponseCommitTree = { sha: string; url: string }; + type ReposUpdateFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; + }; + type ReposUpdateFileResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposUpdateFileResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposUpdateFileResponseCommit = { + author: ReposUpdateFileResponseCommitAuthor; + committer: ReposUpdateFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposUpdateFileResponseCommitTree; + url: string; + verification: ReposUpdateFileResponseCommitVerification; + }; + type ReposUpdateFileResponse = { + commit: ReposUpdateFileResponseCommit; + content: ReposUpdateFileResponseContent; + }; + type ReposUpdateCommitCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateCommitCommentResponse = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposUpdateCommitCommentResponseUser; + }; + type ReposUpdateBranchProtectionResponseRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateBranchProtectionResponseRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposUpdateBranchProtectionResponseRestrictionsAppsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposUpdateBranchProtectionResponseRestrictionsAppsItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposUpdateBranchProtectionResponseRestrictionsAppsItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposUpdateBranchProtectionResponseRestrictionsAppsItemOwner; + permissions: ReposUpdateBranchProtectionResponseRestrictionsAppsItemPermissions; + slug: string; + updated_at: string; + }; + type ReposUpdateBranchProtectionResponseRestrictions = { + apps: Array; + apps_url: string; + teams: Array; + teams_url: string; + url: string; + users: Array; + users_url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredStatusChecks = { + contexts: Array; + contexts_url: string; + strict: boolean; + url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { + teams: Array< + ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem + >; + users_url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviews = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredLinearHistory = { + enabled: boolean; + }; + type ReposUpdateBranchProtectionResponseEnforceAdmins = { + enabled: boolean; + url: string; + }; + type ReposUpdateBranchProtectionResponseAllowForcePushes = { + enabled: boolean; + }; + type ReposUpdateBranchProtectionResponseAllowDeletions = { enabled: boolean }; + type ReposUpdateBranchProtectionResponse = { + allow_deletions: ReposUpdateBranchProtectionResponseAllowDeletions; + allow_force_pushes: ReposUpdateBranchProtectionResponseAllowForcePushes; + enforce_admins: ReposUpdateBranchProtectionResponseEnforceAdmins; + required_linear_history: ReposUpdateBranchProtectionResponseRequiredLinearHistory; + required_pull_request_reviews: ReposUpdateBranchProtectionResponseRequiredPullRequestReviews; + required_status_checks: ReposUpdateBranchProtectionResponseRequiredStatusChecks; + restrictions: ReposUpdateBranchProtectionResponseRestrictions; + url: string; + }; + type ReposUpdateResponseSourcePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposUpdateResponseSourceOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateResponseSource = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposUpdateResponseSourceOwner; + permissions: ReposUpdateResponseSourcePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposUpdateResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposUpdateResponseParentPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposUpdateResponseParentOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateResponseParent = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposUpdateResponseParentOwner; + permissions: ReposUpdateResponseParentPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposUpdateResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateResponseOrganization = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + organization: ReposUpdateResponseOrganization; + owner: ReposUpdateResponseOwner; + parent: ReposUpdateResponseParent; + permissions: ReposUpdateResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + source: ReposUpdateResponseSource; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposTransferResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposTransferResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposTransferResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposTransferResponseOwner; + permissions: ReposTransferResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesReadme = { + html_url: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate = { + html_url: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesLicense = { + html_url: string; + key: string; + name: string; + spdx_id: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate = { + html_url: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesContributing = { + html_url: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct = { + html_url: string; + key: string; + name: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFiles = { + code_of_conduct: ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct; + contributing: ReposRetrieveCommunityProfileMetricsResponseFilesContributing; + issue_template: ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate; + license: ReposRetrieveCommunityProfileMetricsResponseFilesLicense; + pull_request_template: ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate; + readme: ReposRetrieveCommunityProfileMetricsResponseFilesReadme; + }; + type ReposRetrieveCommunityProfileMetricsResponse = { + description: string; + documentation: boolean; + files: ReposRetrieveCommunityProfileMetricsResponseFiles; + health_percentage: number; + updated_at: string; + }; + type ReposRequestPageBuildResponse = { status: string; url: string }; + type ReposReplaceTopicsResponse = { names: Array }; + type ReposReplaceProtectedBranchUserRestrictionsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposReplaceProtectedBranchTeamRestrictionsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposReplaceProtectedBranchAppRestrictionsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposReplaceProtectedBranchAppRestrictionsResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposReplaceProtectedBranchAppRestrictionsResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposReplaceProtectedBranchAppRestrictionsResponseItemOwner; + permissions: ReposReplaceProtectedBranchAppRestrictionsResponseItemPermissions; + slug: string; + updated_at: string; + }; + type ReposRemoveProtectedBranchUserRestrictionsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposRemoveProtectedBranchTeamRestrictionsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposRemoveProtectedBranchAppRestrictionsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposRemoveProtectedBranchAppRestrictionsResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposRemoveProtectedBranchAppRestrictionsResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposRemoveProtectedBranchAppRestrictionsResponseItemOwner; + permissions: ReposRemoveProtectedBranchAppRestrictionsResponseItemPermissions; + slug: string; + updated_at: string; + }; + type ReposMergeResponseParentsItem = { sha: string; url: string }; + type ReposMergeResponseCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposMergeResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposMergeResponseCommitTree = { sha: string; url: string }; + type ReposMergeResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposMergeResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposMergeResponseCommit = { + author: ReposMergeResponseCommitAuthor; + comment_count: number; + committer: ReposMergeResponseCommitCommitter; + message: string; + tree: ReposMergeResponseCommitTree; + url: string; + verification: ReposMergeResponseCommitVerification; + }; + type ReposMergeResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposMergeResponse = { + author: ReposMergeResponseAuthor; + comments_url: string; + commit: ReposMergeResponseCommit; + committer: ReposMergeResponseCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposListUsersWithAccessToProtectedBranchResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListTopicsResponse = { names: Array }; + type ReposListTeamsWithAccessToProtectedBranchResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposListTeamsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposListTagsResponseItemCommit = { sha: string; url: string }; + type ReposListTagsResponseItem = { + commit: ReposListTagsResponseItemCommit; + name: string; + tarball_url: string; + zipball_url: string; + }; + type ReposListStatusesForRefResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListStatusesForRefResponseItem = { + avatar_url: string; + context: string; + created_at: string; + creator: ReposListStatusesForRefResponseItemCreator; + description: string; + id: number; + node_id: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposListReleasesResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListReleasesResponseItemAssetsItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListReleasesResponseItemAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposListReleasesResponseItemAssetsItemUploader; + url: string; + }; + type ReposListReleasesResponseItem = { + assets: Array; + assets_url: string; + author: ReposListReleasesResponseItemAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner; + permissions: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHead = { + label: string; + ref: string; + repo: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo; + sha: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner; + permissions: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBase = { + label: string; + ref: string; + repo: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo; + sha: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinks = { + comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments; + commits: ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits; + html: ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml; + issue: ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue; + review_comment: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment; + review_comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments; + self: ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf; + statuses: ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItem = { + _links: ReposListPullRequestsAssociatedWithCommitResponseItemLinks; + active_lock_reason: string; + assignee: ReposListPullRequestsAssociatedWithCommitResponseItemAssignee; + assignees: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem + >; + author_association: string; + base: ReposListPullRequestsAssociatedWithCommitResponseItemBase; + body: string; + closed_at: string; + comments_url: string; + commits_url: string; + created_at: string; + diff_url: string; + draft: boolean; + head: ReposListPullRequestsAssociatedWithCommitResponseItemHead; + html_url: string; + id: number; + issue_url: string; + labels: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem + >; + locked: boolean; + merge_commit_sha: string; + merged_at: string; + milestone: ReposListPullRequestsAssociatedWithCommitResponseItemMilestone; + node_id: string; + number: number; + patch_url: string; + requested_reviewers: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem + >; + requested_teams: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem + >; + review_comment_url: string; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemUser; + }; + type ReposListPublicResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPublicResponseItem = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposListPublicResponseItemOwner; + private: boolean; + 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; + url: string; + }; + type ReposListProtectedBranchUserRestrictionsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListProtectedBranchTeamRestrictionsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposListPagesBuildsResponseItemPusher = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPagesBuildsResponseItemError = { message: null }; + type ReposListPagesBuildsResponseItem = { + commit: string; + created_at: string; + duration: number; + error: ReposListPagesBuildsResponseItemError; + pusher: ReposListPagesBuildsResponseItemPusher; + status: string; + updated_at: string; + url: string; + }; + type ReposListLanguagesResponse = { C: number; Python: number }; + type ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsForAuthenticatedUserResponseItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner; + private: boolean; + 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; + url: string; + }; + type ReposListInvitationsForAuthenticatedUserResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsForAuthenticatedUserResponseItemInvitee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsForAuthenticatedUserResponseItem = { + created_at: string; + html_url: string; + id: number; + invitee: ReposListInvitationsForAuthenticatedUserResponseItemInvitee; + inviter: ReposListInvitationsForAuthenticatedUserResponseItemInviter; + permissions: string; + repository: ReposListInvitationsForAuthenticatedUserResponseItemRepository; + url: string; + }; + type ReposListInvitationsResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsResponseItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposListInvitationsResponseItemRepositoryOwner; + private: boolean; + 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; + url: string; + }; + type ReposListInvitationsResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsResponseItemInvitee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsResponseItem = { + created_at: string; + html_url: string; + id: number; + invitee: ReposListInvitationsResponseItemInvitee; + inviter: ReposListInvitationsResponseItemInviter; + permissions: string; + repository: ReposListInvitationsResponseItemRepository; + url: string; + }; + type ReposListHooksResponseItemLastResponse = { + code: null; + message: null; + status: string; + }; + type ReposListHooksResponseItemConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposListHooksResponseItem = { + active: boolean; + config: ReposListHooksResponseItemConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposListHooksResponseItemLastResponse; + name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; + }; + type ReposListForksResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposListForksResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListForksResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type ReposListForksResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ReposListForksResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListForksResponseItemOwner; + permissions: ReposListForksResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposListForOrgResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposListForOrgResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListForOrgResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type ReposListForOrgResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ReposListForOrgResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListForOrgResponseItemOwner; + permissions: ReposListForOrgResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposListDownloadsResponseItem = { + content_type: string; + description: string; + download_count: number; + html_url: string; + id: number; + name: string; + size: number; + url: string; + }; + type ReposListDeploymentsResponseItemPayload = { deploy: string }; + type ReposListDeploymentsResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListDeploymentsResponseItem = { + created_at: string; + creator: ReposListDeploymentsResponseItemCreator; + description: string; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: ReposListDeploymentsResponseItemPayload; + production_environment: boolean; + ref: string; + repository_url: string; + sha: string; + statuses_url: string; + task: string; + transient_environment: boolean; + updated_at: string; + url: string; + }; + type ReposListDeploymentStatusesResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListDeploymentStatusesResponseItem = { + created_at: string; + creator: ReposListDeploymentStatusesResponseItemCreator; + deployment_url: string; + description: string; + environment: string; + environment_url: string; + id: number; + log_url: string; + node_id: string; + repository_url: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposListDeployKeysResponseItem = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type ReposListContributorsResponseItem = { + avatar_url: string; + contributions: number; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListCommitsResponseItemParentsItem = { sha: string; url: string }; + type ReposListCommitsResponseItemCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListCommitsResponseItemCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposListCommitsResponseItemCommitTree = { sha: string; url: string }; + type ReposListCommitsResponseItemCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposListCommitsResponseItemCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposListCommitsResponseItemCommit = { + author: ReposListCommitsResponseItemCommitAuthor; + comment_count: number; + committer: ReposListCommitsResponseItemCommitCommitter; + message: string; + tree: ReposListCommitsResponseItemCommitTree; + url: string; + verification: ReposListCommitsResponseItemCommitVerification; + }; + type ReposListCommitsResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListCommitsResponseItem = { + author: ReposListCommitsResponseItemAuthor; + comments_url: string; + commit: ReposListCommitsResponseItemCommit; + committer: ReposListCommitsResponseItemCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposListCommitCommentsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListCommitCommentsResponseItem = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposListCommitCommentsResponseItemUser; + }; + type ReposListCommentsForCommitResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListCommentsForCommitResponseItem = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposListCommentsForCommitResponseItemUser; + }; + type ReposListCollaboratorsResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposListCollaboratorsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + permissions: ReposListCollaboratorsResponseItemPermissions; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListBranchesForHeadCommitResponseItemCommit = { + sha: string; + url: string; + }; + type ReposListBranchesForHeadCommitResponseItem = { + commit: ReposListBranchesForHeadCommitResponseItemCommit; + name: string; + protected: string; + }; + type ReposListBranchesResponseItemProtectionRequiredStatusChecks = { + contexts: Array; + enforcement_level: string; + }; + type ReposListBranchesResponseItemProtection = { + enabled: boolean; + required_status_checks: ReposListBranchesResponseItemProtectionRequiredStatusChecks; + }; + type ReposListBranchesResponseItemCommit = { sha: string; url: string }; + type ReposListBranchesResponseItem = { + commit: ReposListBranchesResponseItemCommit; + name: string; + protected: boolean; + protection: ReposListBranchesResponseItemProtection; + protection_url: string; + }; + type ReposListAssetsForReleaseResponseItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListAssetsForReleaseResponseItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposListAssetsForReleaseResponseItemUploader; + url: string; + }; + type ReposListAppsWithAccessToProtectedBranchResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposListAppsWithAccessToProtectedBranchResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposListAppsWithAccessToProtectedBranchResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposListAppsWithAccessToProtectedBranchResponseItemOwner; + permissions: ReposListAppsWithAccessToProtectedBranchResponseItemPermissions; + slug: string; + updated_at: string; + }; + type ReposGetViewsResponseViewsItem = { + count: number; + timestamp: string; + uniques: number; + }; + type ReposGetViewsResponse = { + count: number; + uniques: number; + views: Array; + }; + type ReposGetUsersWithAccessToProtectedBranchResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetTopReferrersResponseItem = { + count: number; + referrer: string; + uniques: number; + }; + type ReposGetTopPathsResponseItem = { + count: number; + path: string; + title: string; + uniques: number; + }; + type ReposGetTeamsWithAccessToProtectedBranchResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposGetReleaseByTagResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetReleaseByTagResponseAssetsItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetReleaseByTagResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposGetReleaseByTagResponseAssetsItemUploader; + url: string; + }; + type ReposGetReleaseByTagResponse = { + assets: Array; + assets_url: string; + author: ReposGetReleaseByTagResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposGetReleaseAssetResponseUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetReleaseAssetResponse = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposGetReleaseAssetResponseUploader; + url: string; + }; + type ReposGetReleaseResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetReleaseResponseAssetsItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetReleaseResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposGetReleaseResponseAssetsItemUploader; + url: string; + }; + type ReposGetReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposGetReleaseResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposGetReadmeResponseLinks = { + git: string; + html: string; + self: string; + }; + type ReposGetReadmeResponse = { + _links: ReposGetReadmeResponseLinks; + content: string; + download_url: string; + encoding: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type ReposGetProtectedBranchRestrictionsResponseUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetProtectedBranchRestrictionsResponseTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposGetProtectedBranchRestrictionsResponseAppsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposGetProtectedBranchRestrictionsResponseAppsItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposGetProtectedBranchRestrictionsResponseAppsItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposGetProtectedBranchRestrictionsResponseAppsItemOwner; + permissions: ReposGetProtectedBranchRestrictionsResponseAppsItemPermissions; + slug: string; + updated_at: string; + }; + type ReposGetProtectedBranchRestrictionsResponse = { + apps: Array; + apps_url: string; + teams: Array; + teams_url: string; + url: string; + users: Array; + users_url: string; + }; + type ReposGetProtectedBranchRequiredStatusChecksResponse = { + contexts: Array; + contexts_url: string; + strict: boolean; + url: string; + }; + type ReposGetProtectedBranchRequiredSignaturesResponse = { + enabled: boolean; + url: string; + }; + type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions = { + teams: Array< + ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem + >; + users_url: string; + }; + type ReposGetProtectedBranchPullRequestReviewEnforcementResponse = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; + }; + type ReposGetProtectedBranchAdminEnforcementResponse = { + enabled: boolean; + url: string; + }; + type ReposGetParticipationStatsResponse = { + all: Array; + owner: Array; + }; + type ReposGetPagesBuildResponsePusher = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetPagesBuildResponseError = { message: null }; + type ReposGetPagesBuildResponse = { + commit: string; + created_at: string; + duration: number; + error: ReposGetPagesBuildResponseError; + pusher: ReposGetPagesBuildResponsePusher; + status: string; + updated_at: string; + url: string; + }; + type ReposGetPagesResponseSource = { branch: string; directory: string }; + type ReposGetPagesResponse = { + cname: string; + custom_404: boolean; + html_url: string; + source: ReposGetPagesResponseSource; + status: string; + url: string; + }; + type ReposGetLatestReleaseResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetLatestReleaseResponseAssetsItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetLatestReleaseResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposGetLatestReleaseResponseAssetsItemUploader; + url: string; + }; + type ReposGetLatestReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposGetLatestReleaseResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposGetLatestPagesBuildResponsePusher = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetLatestPagesBuildResponseError = { message: null }; + type ReposGetLatestPagesBuildResponse = { + commit: string; + created_at: string; + duration: number; + error: ReposGetLatestPagesBuildResponseError; + pusher: ReposGetLatestPagesBuildResponsePusher; + status: string; + updated_at: string; + url: string; + }; + type ReposGetHookResponseLastResponse = { + code: null; + message: null; + status: string; + }; + type ReposGetHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposGetHookResponse = { + active: boolean; + config: ReposGetHookResponseConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposGetHookResponseLastResponse; + name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; + }; + type ReposGetDownloadResponse = { + content_type: string; + description: string; + download_count: number; + html_url: string; + id: number; + name: string; + size: number; + url: string; + }; + type ReposGetDeploymentStatusResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetDeploymentStatusResponse = { + created_at: string; + creator: ReposGetDeploymentStatusResponseCreator; + deployment_url: string; + description: string; + environment: string; + environment_url: string; + id: number; + log_url: string; + node_id: string; + repository_url: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposGetDeploymentResponsePayload = { deploy: string }; + type ReposGetDeploymentResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetDeploymentResponse = { + created_at: string; + creator: ReposGetDeploymentResponseCreator; + description: string; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: ReposGetDeploymentResponsePayload; + production_environment: boolean; + ref: string; + repository_url: string; + sha: string; + statuses_url: string; + task: string; + transient_environment: boolean; + updated_at: string; + url: string; + }; + type ReposGetDeployKeyResponse = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type ReposGetContributorsStatsResponseItemWeeksItem = { + a: number; + c: number; + d: number; + w: string; + }; + type ReposGetContributorsStatsResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetContributorsStatsResponseItem = { + author: ReposGetContributorsStatsResponseItemAuthor; + total: number; + weeks: Array; + }; + type ReposGetContentsResponseItemLinks = { + git: string; + html: string; + self: string; + }; + type ReposGetContentsResponseItem = { + _links: ReposGetContentsResponseItemLinks; + download_url: string | null; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type ReposGetContentsResponseLinks = { + git: string; + html: string; + self: string; + }; + type ReposGetContentsResponse = + | { + _links: ReposGetContentsResponseLinks; + content?: string; + download_url: string | null; + encoding?: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + target?: string; + submodule_git_url?: string; + } + | Array; + type ReposGetCommitCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetCommitCommentResponse = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposGetCommitCommentResponseUser; + }; + type ReposGetCommitActivityStatsResponseItem = { + days: Array; + total: number; + week: number; + }; + type ReposGetCommitResponseStats = { + additions: number; + deletions: number; + total: number; + }; + type ReposGetCommitResponseParentsItem = { sha: string; url: string }; + type ReposGetCommitResponseFilesItem = { + additions: number; + blob_url: string; + changes: number; + deletions: number; + filename: string; + patch: string; + raw_url: string; + status: string; + }; + type ReposGetCommitResponseCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetCommitResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposGetCommitResponseCommitTree = { sha: string; url: string }; + type ReposGetCommitResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposGetCommitResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposGetCommitResponseCommit = { + author: ReposGetCommitResponseCommitAuthor; + comment_count: number; + committer: ReposGetCommitResponseCommitCommitter; + message: string; + tree: ReposGetCommitResponseCommitTree; + url: string; + verification: ReposGetCommitResponseCommitVerification; + }; + type ReposGetCommitResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetCommitResponse = { + author: ReposGetCommitResponseAuthor; + comments_url: string; + commit: ReposGetCommitResponseCommit; + committer: ReposGetCommitResponseCommitter; + files: Array; + html_url: string; + node_id: string; + parents: Array; + sha: string; + stats: ReposGetCommitResponseStats; + url: string; + }; + type ReposGetCombinedStatusForRefResponseStatusesItem = { + avatar_url: string; + context: string; + created_at: string; + description: string; + id: number; + node_id: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposGetCombinedStatusForRefResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetCombinedStatusForRefResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposGetCombinedStatusForRefResponseRepositoryOwner; + private: boolean; + 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; + url: string; + }; + type ReposGetCombinedStatusForRefResponse = { + commit_url: string; + repository: ReposGetCombinedStatusForRefResponseRepository; + sha: string; + state: string; + statuses: Array; + total_count: number; + url: string; + }; + type ReposGetCollaboratorPermissionLevelResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetCollaboratorPermissionLevelResponse = { + permission: string; + user: ReposGetCollaboratorPermissionLevelResponseUser; + }; + type ReposGetClonesResponseClonesItem = { + count: number; + timestamp: string; + uniques: number; + }; + type ReposGetClonesResponse = { + clones: Array; + count: number; + uniques: number; + }; + type ReposGetBranchProtectionResponseRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetBranchProtectionResponseRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposGetBranchProtectionResponseRestrictionsAppsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposGetBranchProtectionResponseRestrictionsAppsItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposGetBranchProtectionResponseRestrictionsAppsItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposGetBranchProtectionResponseRestrictionsAppsItemOwner; + permissions: ReposGetBranchProtectionResponseRestrictionsAppsItemPermissions; + slug: string; + updated_at: string; + }; + type ReposGetBranchProtectionResponseRestrictions = { + apps: Array; + apps_url: string; + teams: Array; + teams_url: string; + url: string; + users: Array; + users_url: string; + }; + type ReposGetBranchProtectionResponseRequiredStatusChecks = { + contexts: Array; + contexts_url: string; + strict: boolean; + url: string; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { + teams: Array< + ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem + >; + users_url: string; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviews = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; + }; + type ReposGetBranchProtectionResponseRequiredLinearHistory = { + enabled: boolean; + }; + type ReposGetBranchProtectionResponseEnforceAdmins = { + enabled: boolean; + url: string; + }; + type ReposGetBranchProtectionResponseAllowForcePushes = { enabled: boolean }; + type ReposGetBranchProtectionResponseAllowDeletions = { enabled: boolean }; + type ReposGetBranchProtectionResponse = { + allow_deletions: ReposGetBranchProtectionResponseAllowDeletions; + allow_force_pushes: ReposGetBranchProtectionResponseAllowForcePushes; + enforce_admins: ReposGetBranchProtectionResponseEnforceAdmins; + required_linear_history: ReposGetBranchProtectionResponseRequiredLinearHistory; + required_pull_request_reviews: ReposGetBranchProtectionResponseRequiredPullRequestReviews; + required_status_checks: ReposGetBranchProtectionResponseRequiredStatusChecks; + restrictions: ReposGetBranchProtectionResponseRestrictions; + url: string; + }; + type ReposGetBranchResponseProtectionRequiredStatusChecks = { + contexts: Array; + enforcement_level: string; + }; + type ReposGetBranchResponseProtection = { + enabled: boolean; + required_status_checks: ReposGetBranchResponseProtectionRequiredStatusChecks; + }; + type ReposGetBranchResponseCommitParentsItem = { sha: string; url: string }; + type ReposGetBranchResponseCommitCommitter = { + avatar_url: string; + gravatar_id: string; + id: number; + login: string; + url: string; + }; + type ReposGetBranchResponseCommitCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposGetBranchResponseCommitCommitTree = { sha: string; url: string }; + type ReposGetBranchResponseCommitCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposGetBranchResponseCommitCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposGetBranchResponseCommitCommit = { + author: ReposGetBranchResponseCommitCommitAuthor; + committer: ReposGetBranchResponseCommitCommitCommitter; + message: string; + tree: ReposGetBranchResponseCommitCommitTree; + url: string; + verification: ReposGetBranchResponseCommitCommitVerification; + }; + type ReposGetBranchResponseCommitAuthor = { + avatar_url: string; + gravatar_id: string; + id: number; + login: string; + url: string; + }; + type ReposGetBranchResponseCommit = { + author: ReposGetBranchResponseCommitAuthor; + commit: ReposGetBranchResponseCommitCommit; + committer: ReposGetBranchResponseCommitCommitter; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposGetBranchResponseLinks = { html: string; self: string }; + type ReposGetBranchResponse = { + _links: ReposGetBranchResponseLinks; + commit: ReposGetBranchResponseCommit; + name: string; + protected: boolean; + protection: ReposGetBranchResponseProtection; + protection_url: string; + }; + type ReposGetAppsWithAccessToProtectedBranchResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposGetAppsWithAccessToProtectedBranchResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposGetAppsWithAccessToProtectedBranchResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposGetAppsWithAccessToProtectedBranchResponseItemOwner; + permissions: ReposGetAppsWithAccessToProtectedBranchResponseItemPermissions; + slug: string; + updated_at: string; + }; + type ReposGetResponseSourcePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposGetResponseSourceOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetResponseSource = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposGetResponseSourceOwner; + permissions: ReposGetResponseSourcePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposGetResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposGetResponseParentPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposGetResponseParentOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetResponseParent = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposGetResponseParentOwner; + permissions: ReposGetResponseParentPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposGetResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetResponseOrganization = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetResponseLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type ReposGetResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ReposGetResponseLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + organization: ReposGetResponseOrganization; + owner: ReposGetResponseOwner; + parent: ReposGetResponseParent; + permissions: ReposGetResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + source: ReposGetResponseSource; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposEnablePagesSiteResponseSource = { + branch: string; + directory: string; + }; + type ReposEnablePagesSiteResponse = { + cname: string; + custom_404: boolean; + html_url: string; + source: ReposEnablePagesSiteResponseSource; + status: string; + url: string; + }; + type ReposDeleteFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposDeleteFileResponseCommitTree = { sha: string; url: string }; + type ReposDeleteFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; + }; + type ReposDeleteFileResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposDeleteFileResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposDeleteFileResponseCommit = { + author: ReposDeleteFileResponseCommitAuthor; + committer: ReposDeleteFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposDeleteFileResponseCommitTree; + url: string; + verification: ReposDeleteFileResponseCommitVerification; + }; + type ReposDeleteFileResponse = { + commit: ReposDeleteFileResponseCommit; + content: null; + }; + type ReposDeleteResponse = { documentation_url: string; message: string }; + type ReposCreateUsingTemplateResponseTemplateRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposCreateUsingTemplateResponseTemplateRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateUsingTemplateResponseTemplateRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateUsingTemplateResponseTemplateRepositoryOwner; + permissions: ReposCreateUsingTemplateResponseTemplateRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposCreateUsingTemplateResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposCreateUsingTemplateResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateUsingTemplateResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateUsingTemplateResponseOwner; + permissions: ReposCreateUsingTemplateResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: ReposCreateUsingTemplateResponseTemplateRepository; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposCreateStatusResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateStatusResponse = { + avatar_url: string; + context: string; + created_at: string; + creator: ReposCreateStatusResponseCreator; + description: string; + id: number; + node_id: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposCreateReleaseResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposCreateReleaseResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposCreateOrUpdateFileResponseContentLinks = { + git: string; + html: string; + self: string; + }; + type ReposCreateOrUpdateFileResponseContent = { + _links: ReposCreateOrUpdateFileResponseContentLinks; + download_url: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type ReposCreateOrUpdateFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposCreateOrUpdateFileResponseCommitTree = { sha: string; url: string }; + type ReposCreateOrUpdateFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; + }; + type ReposCreateOrUpdateFileResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposCreateOrUpdateFileResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposCreateOrUpdateFileResponseCommit = { + author: ReposCreateOrUpdateFileResponseCommitAuthor; + committer: ReposCreateOrUpdateFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposCreateOrUpdateFileResponseCommitTree; + url: string; + verification: ReposCreateOrUpdateFileResponseCommitVerification; + }; + type ReposCreateOrUpdateFileResponse = { + commit: ReposCreateOrUpdateFileResponseCommit; + content: ReposCreateOrUpdateFileResponseContent; + }; + type ReposCreateInOrgResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposCreateInOrgResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateInOrgResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateInOrgResponseOwner; + permissions: ReposCreateInOrgResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposCreateHookResponseLastResponse = { + code: null; + message: null; + status: string; + }; + type ReposCreateHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposCreateHookResponse = { + active: boolean; + config: ReposCreateHookResponseConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposCreateHookResponseLastResponse; + name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; + }; + type ReposCreateForkResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposCreateForkResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateForkResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateForkResponseOwner; + permissions: ReposCreateForkResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposCreateForAuthenticatedUserResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposCreateForAuthenticatedUserResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateForAuthenticatedUserResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateForAuthenticatedUserResponseOwner; + permissions: ReposCreateForAuthenticatedUserResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ReposCreateFileResponseContentLinks = { + git: string; + html: string; + self: string; + }; + type ReposCreateFileResponseContent = { + _links: ReposCreateFileResponseContentLinks; + download_url: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type ReposCreateFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposCreateFileResponseCommitTree = { sha: string; url: string }; + type ReposCreateFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; + }; + type ReposCreateFileResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposCreateFileResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposCreateFileResponseCommit = { + author: ReposCreateFileResponseCommitAuthor; + committer: ReposCreateFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposCreateFileResponseCommitTree; + url: string; + verification: ReposCreateFileResponseCommitVerification; + }; + type ReposCreateFileResponse = { + commit: ReposCreateFileResponseCommit; + content: ReposCreateFileResponseContent; + }; + type ReposCreateDeploymentStatusResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateDeploymentStatusResponse = { + created_at: string; + creator: ReposCreateDeploymentStatusResponseCreator; + deployment_url: string; + description: string; + environment: string; + environment_url: string; + id: number; + log_url: string; + node_id: string; + repository_url: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposCreateDeploymentResponsePayload = { deploy: string }; + type ReposCreateDeploymentResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateDeploymentResponse = { + created_at: string; + creator: ReposCreateDeploymentResponseCreator; + description: string; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: ReposCreateDeploymentResponsePayload; + production_environment: boolean; + ref: string; + repository_url: string; + sha: string; + statuses_url: string; + task: string; + transient_environment: boolean; + updated_at: string; + url: string; + }; + type ReposCreateCommitCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateCommitCommentResponse = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposCreateCommitCommentResponseUser; + }; + type ReposCompareCommitsResponseMergeBaseCommitParentsItem = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommitTree = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommit = { + author: ReposCompareCommitsResponseMergeBaseCommitCommitAuthor; + comment_count: number; + committer: ReposCompareCommitsResponseMergeBaseCommitCommitCommitter; + message: string; + tree: ReposCompareCommitsResponseMergeBaseCommitCommitTree; + url: string; + verification: ReposCompareCommitsResponseMergeBaseCommitCommitVerification; + }; + type ReposCompareCommitsResponseMergeBaseCommitAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseMergeBaseCommit = { + author: ReposCompareCommitsResponseMergeBaseCommitAuthor; + comments_url: string; + commit: ReposCompareCommitsResponseMergeBaseCommitCommit; + committer: ReposCompareCommitsResponseMergeBaseCommitCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposCompareCommitsResponseFilesItem = { + additions: number; + blob_url: string; + changes: number; + contents_url: string; + deletions: number; + filename: string; + patch: string; + raw_url: string; + sha: string; + status: string; + }; + type ReposCompareCommitsResponseCommitsItemParentsItem = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseCommitsItemCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseCommitsItemCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposCompareCommitsResponseCommitsItemCommitTree = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseCommitsItemCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseCommitsItemCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseCommitsItemCommit = { + author: ReposCompareCommitsResponseCommitsItemCommitAuthor; + comment_count: number; + committer: ReposCompareCommitsResponseCommitsItemCommitCommitter; + message: string; + tree: ReposCompareCommitsResponseCommitsItemCommitTree; + url: string; + verification: ReposCompareCommitsResponseCommitsItemCommitVerification; + }; + type ReposCompareCommitsResponseCommitsItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseCommitsItem = { + author: ReposCompareCommitsResponseCommitsItemAuthor; + comments_url: string; + commit: ReposCompareCommitsResponseCommitsItemCommit; + committer: ReposCompareCommitsResponseCommitsItemCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposCompareCommitsResponseBaseCommitParentsItem = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseBaseCommitCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseBaseCommitCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposCompareCommitsResponseBaseCommitCommitTree = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseBaseCommitCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseBaseCommitCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseBaseCommitCommit = { + author: ReposCompareCommitsResponseBaseCommitCommitAuthor; + comment_count: number; + committer: ReposCompareCommitsResponseBaseCommitCommitCommitter; + message: string; + tree: ReposCompareCommitsResponseBaseCommitCommitTree; + url: string; + verification: ReposCompareCommitsResponseBaseCommitCommitVerification; + }; + type ReposCompareCommitsResponseBaseCommitAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseBaseCommit = { + author: ReposCompareCommitsResponseBaseCommitAuthor; + comments_url: string; + commit: ReposCompareCommitsResponseBaseCommitCommit; + committer: ReposCompareCommitsResponseBaseCommitCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposCompareCommitsResponse = { + ahead_by: number; + base_commit: ReposCompareCommitsResponseBaseCommit; + behind_by: number; + commits: Array; + diff_url: string; + files: Array; + html_url: string; + merge_base_commit: ReposCompareCommitsResponseMergeBaseCommit; + patch_url: string; + permalink_url: string; + status: string; + total_commits: number; + url: string; + }; + type ReposAddProtectedBranchUserRestrictionsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposAddProtectedBranchTeamRestrictionsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposAddProtectedBranchRequiredSignaturesResponse = { + enabled: boolean; + url: string; + }; + type ReposAddProtectedBranchAppRestrictionsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposAddProtectedBranchAppRestrictionsResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposAddProtectedBranchAppRestrictionsResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposAddProtectedBranchAppRestrictionsResponseItemOwner; + permissions: ReposAddProtectedBranchAppRestrictionsResponseItemPermissions; + slug: string; + updated_at: string; + }; + type ReposAddProtectedBranchAdminEnforcementResponse = { + enabled: boolean; + url: string; + }; + type ReposAddDeployKeyResponse = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type ReposAddCollaboratorResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposAddCollaboratorResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposAddCollaboratorResponseRepositoryOwner; + private: boolean; + 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; + url: string; + }; + type ReposAddCollaboratorResponseInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposAddCollaboratorResponseInvitee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposAddCollaboratorResponse = { + created_at: string; + html_url: string; + id: number; + invitee: ReposAddCollaboratorResponseInvitee; + inviter: ReposAddCollaboratorResponseInviter; + permissions: string; + repository: ReposAddCollaboratorResponseRepository; + url: string; + }; + type ReactionsListForTeamDiscussionLegacyResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForTeamDiscussionLegacyResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionLegacyResponseItemUser; + }; + type ReactionsListForTeamDiscussionInOrgResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForTeamDiscussionInOrgResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionInOrgResponseItemUser; + }; + type ReactionsListForTeamDiscussionCommentLegacyResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForTeamDiscussionCommentLegacyResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionCommentLegacyResponseItemUser; + }; + type ReactionsListForTeamDiscussionCommentInOrgResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForTeamDiscussionCommentInOrgResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionCommentInOrgResponseItemUser; + }; + type ReactionsListForTeamDiscussionCommentResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForTeamDiscussionCommentResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionCommentResponseItemUser; + }; + type ReactionsListForTeamDiscussionResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForTeamDiscussionResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionResponseItemUser; + }; + type ReactionsListForPullRequestReviewCommentResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForPullRequestReviewCommentResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForPullRequestReviewCommentResponseItemUser; + }; + type ReactionsListForIssueCommentResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForIssueCommentResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForIssueCommentResponseItemUser; + }; + type ReactionsListForIssueResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForIssueResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForIssueResponseItemUser; + }; + type ReactionsListForCommitCommentResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForCommitCommentResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForCommitCommentResponseItemUser; + }; + type ReactionsCreateForTeamDiscussionLegacyResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForTeamDiscussionLegacyResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionLegacyResponseUser; + }; + type ReactionsCreateForTeamDiscussionInOrgResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForTeamDiscussionInOrgResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionInOrgResponseUser; + }; + type ReactionsCreateForTeamDiscussionCommentLegacyResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForTeamDiscussionCommentLegacyResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionCommentLegacyResponseUser; + }; + type ReactionsCreateForTeamDiscussionCommentInOrgResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForTeamDiscussionCommentInOrgResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionCommentInOrgResponseUser; + }; + type ReactionsCreateForTeamDiscussionCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForTeamDiscussionCommentResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionCommentResponseUser; + }; + type ReactionsCreateForTeamDiscussionResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForTeamDiscussionResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionResponseUser; + }; + type ReactionsCreateForPullRequestReviewCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForPullRequestReviewCommentResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForPullRequestReviewCommentResponseUser; + }; + type ReactionsCreateForIssueCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForIssueCommentResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForIssueCommentResponseUser; + }; + type ReactionsCreateForIssueResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForIssueResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForIssueResponseUser; + }; + type ReactionsCreateForCommitCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForCommitCommentResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForCommitCommentResponseUser; + }; + type RateLimitGetResponseResourcesSearch = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResourcesIntegrationManifest = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResourcesGraphql = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResourcesCore = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResources = { + core: RateLimitGetResponseResourcesCore; + graphql: RateLimitGetResponseResourcesGraphql; + integration_manifest: RateLimitGetResponseResourcesIntegrationManifest; + search: RateLimitGetResponseResourcesSearch; + }; + type RateLimitGetResponseRate = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponse = { + rate: RateLimitGetResponseRate; + resources: RateLimitGetResponseResources; + }; + type PullsUpdateReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateReviewResponseLinksPullRequest = { href: string }; + type PullsUpdateReviewResponseLinksHtml = { href: string }; + type PullsUpdateReviewResponseLinks = { + html: PullsUpdateReviewResponseLinksHtml; + pull_request: PullsUpdateReviewResponseLinksPullRequest; + }; + type PullsUpdateReviewResponse = { + _links: PullsUpdateReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsUpdateReviewResponseUser; + }; + type PullsUpdateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateCommentResponseLinksSelf = { href: string }; + type PullsUpdateCommentResponseLinksPullRequest = { href: string }; + type PullsUpdateCommentResponseLinksHtml = { href: string }; + type PullsUpdateCommentResponseLinks = { + html: PullsUpdateCommentResponseLinksHtml; + pull_request: PullsUpdateCommentResponseLinksPullRequest; + self: PullsUpdateCommentResponseLinksSelf; + }; + type PullsUpdateCommentResponse = { + _links: PullsUpdateCommentResponseLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsUpdateCommentResponseUser; + }; + type PullsUpdateBranchResponse = { message: string; url: string }; + type PullsUpdateResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsUpdateResponseRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsUpdateResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsUpdateResponseMergedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsUpdateResponseHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsUpdateResponseHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsUpdateResponseHeadRepoOwner; + permissions: PullsUpdateResponseHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsUpdateResponseHead = { + label: string; + ref: string; + repo: PullsUpdateResponseHeadRepo; + sha: string; + user: PullsUpdateResponseHeadUser; + }; + type PullsUpdateResponseBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsUpdateResponseBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsUpdateResponseBaseRepoOwner; + permissions: PullsUpdateResponseBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsUpdateResponseBase = { + label: string; + ref: string; + repo: PullsUpdateResponseBaseRepo; + sha: string; + user: PullsUpdateResponseBaseUser; + }; + type PullsUpdateResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseLinksStatuses = { href: string }; + type PullsUpdateResponseLinksSelf = { href: string }; + type PullsUpdateResponseLinksReviewComments = { href: string }; + type PullsUpdateResponseLinksReviewComment = { href: string }; + type PullsUpdateResponseLinksIssue = { href: string }; + type PullsUpdateResponseLinksHtml = { href: string }; + type PullsUpdateResponseLinksCommits = { href: string }; + type PullsUpdateResponseLinksComments = { href: string }; + type PullsUpdateResponseLinks = { + comments: PullsUpdateResponseLinksComments; + commits: PullsUpdateResponseLinksCommits; + html: PullsUpdateResponseLinksHtml; + issue: PullsUpdateResponseLinksIssue; + review_comment: PullsUpdateResponseLinksReviewComment; + review_comments: PullsUpdateResponseLinksReviewComments; + self: PullsUpdateResponseLinksSelf; + statuses: PullsUpdateResponseLinksStatuses; + }; + type PullsUpdateResponse = { + _links: PullsUpdateResponseLinks; + active_lock_reason: string; + additions: number; + assignee: PullsUpdateResponseAssignee; + assignees: Array; + author_association: string; + base: PullsUpdateResponseBase; + body: string; + changed_files: number; + closed_at: string; + comments: number; + comments_url: string; + commits: number; + commits_url: string; + created_at: string; + deletions: number; + diff_url: string; + draft: boolean; + head: PullsUpdateResponseHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + maintainer_can_modify: boolean; + merge_commit_sha: string; + mergeable: boolean; + mergeable_state: string; + merged: boolean; + merged_at: string; + merged_by: PullsUpdateResponseMergedBy; + milestone: PullsUpdateResponseMilestone; + node_id: string; + number: number; + patch_url: string; + rebaseable: boolean; + requested_reviewers: Array; + requested_teams: Array; + review_comment_url: string; + review_comments: number; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsUpdateResponseUser; + }; + type PullsSubmitReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsSubmitReviewResponseLinksPullRequest = { href: string }; + type PullsSubmitReviewResponseLinksHtml = { href: string }; + type PullsSubmitReviewResponseLinks = { + html: PullsSubmitReviewResponseLinksHtml; + pull_request: PullsSubmitReviewResponseLinksPullRequest; + }; + type PullsSubmitReviewResponse = { + _links: PullsSubmitReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + submitted_at: string; + user: PullsSubmitReviewResponseUser; + }; + type PullsMergeResponse = { merged: boolean; message: string; sha: string }; + type PullsListReviewsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListReviewsResponseItemLinksPullRequest = { href: string }; + type PullsListReviewsResponseItemLinksHtml = { href: string }; + type PullsListReviewsResponseItemLinks = { + html: PullsListReviewsResponseItemLinksHtml; + pull_request: PullsListReviewsResponseItemLinksPullRequest; + }; + type PullsListReviewsResponseItem = { + _links: PullsListReviewsResponseItemLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + submitted_at: string; + user: PullsListReviewsResponseItemUser; + }; + type PullsListReviewRequestsResponseUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListReviewRequestsResponseTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsListReviewRequestsResponse = { + teams: Array; + users: Array; + }; + type PullsListFilesResponseItem = { + additions: number; + blob_url: string; + changes: number; + contents_url: string; + deletions: number; + filename: string; + patch: string; + raw_url: string; + sha: string; + status: string; + }; + type PullsListCommitsResponseItemParentsItem = { sha: string; url: string }; + type PullsListCommitsResponseItemCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListCommitsResponseItemCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type PullsListCommitsResponseItemCommitTree = { sha: string; url: string }; + type PullsListCommitsResponseItemCommitCommitter = { + date: string; + email: string; + name: string; + }; + type PullsListCommitsResponseItemCommitAuthor = { + date: string; + email: string; + name: string; + }; + type PullsListCommitsResponseItemCommit = { + author: PullsListCommitsResponseItemCommitAuthor; + comment_count: number; + committer: PullsListCommitsResponseItemCommitCommitter; + message: string; + tree: PullsListCommitsResponseItemCommitTree; + url: string; + verification: PullsListCommitsResponseItemCommitVerification; + }; + type PullsListCommitsResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListCommitsResponseItem = { + author: PullsListCommitsResponseItemAuthor; + comments_url: string; + commit: PullsListCommitsResponseItemCommit; + committer: PullsListCommitsResponseItemCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type PullsListCommentsForRepoResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListCommentsForRepoResponseItemLinksSelf = { href: string }; + type PullsListCommentsForRepoResponseItemLinksPullRequest = { href: string }; + type PullsListCommentsForRepoResponseItemLinksHtml = { href: string }; + type PullsListCommentsForRepoResponseItemLinks = { + html: PullsListCommentsForRepoResponseItemLinksHtml; + pull_request: PullsListCommentsForRepoResponseItemLinksPullRequest; + self: PullsListCommentsForRepoResponseItemLinksSelf; + }; + type PullsListCommentsForRepoResponseItem = { + _links: PullsListCommentsForRepoResponseItemLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsListCommentsForRepoResponseItemUser; + }; + type PullsListCommentsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListCommentsResponseItemLinksSelf = { href: string }; + type PullsListCommentsResponseItemLinksPullRequest = { href: string }; + type PullsListCommentsResponseItemLinksHtml = { href: string }; + type PullsListCommentsResponseItemLinks = { + html: PullsListCommentsResponseItemLinksHtml; + pull_request: PullsListCommentsResponseItemLinksPullRequest; + self: PullsListCommentsResponseItemLinksSelf; + }; + type PullsListCommentsResponseItem = { + _links: PullsListCommentsResponseItemLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsListCommentsResponseItemUser; + }; + type PullsListResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsListResponseItemRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsListResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsListResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsListResponseItemHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsListResponseItemHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsListResponseItemHeadRepoOwner; + permissions: PullsListResponseItemHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsListResponseItemHead = { + label: string; + ref: string; + repo: PullsListResponseItemHeadRepo; + sha: string; + user: PullsListResponseItemHeadUser; + }; + type PullsListResponseItemBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsListResponseItemBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsListResponseItemBaseRepoOwner; + permissions: PullsListResponseItemBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsListResponseItemBase = { + label: string; + ref: string; + repo: PullsListResponseItemBaseRepo; + sha: string; + user: PullsListResponseItemBaseUser; + }; + type PullsListResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemLinksStatuses = { href: string }; + type PullsListResponseItemLinksSelf = { href: string }; + type PullsListResponseItemLinksReviewComments = { href: string }; + type PullsListResponseItemLinksReviewComment = { href: string }; + type PullsListResponseItemLinksIssue = { href: string }; + type PullsListResponseItemLinksHtml = { href: string }; + type PullsListResponseItemLinksCommits = { href: string }; + type PullsListResponseItemLinksComments = { href: string }; + type PullsListResponseItemLinks = { + comments: PullsListResponseItemLinksComments; + commits: PullsListResponseItemLinksCommits; + html: PullsListResponseItemLinksHtml; + issue: PullsListResponseItemLinksIssue; + review_comment: PullsListResponseItemLinksReviewComment; + review_comments: PullsListResponseItemLinksReviewComments; + self: PullsListResponseItemLinksSelf; + statuses: PullsListResponseItemLinksStatuses; + }; + type PullsListResponseItem = { + _links: PullsListResponseItemLinks; + active_lock_reason: string; + assignee: PullsListResponseItemAssignee; + assignees: Array; + author_association: string; + base: PullsListResponseItemBase; + body: string; + closed_at: string; + comments_url: string; + commits_url: string; + created_at: string; + diff_url: string; + draft: boolean; + head: PullsListResponseItemHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + merge_commit_sha: string; + merged_at: string; + milestone: PullsListResponseItemMilestone; + node_id: string; + number: number; + patch_url: string; + requested_reviewers: Array; + requested_teams: Array; + review_comment_url: string; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsListResponseItemUser; + }; + type PullsGetReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetReviewResponseLinksPullRequest = { href: string }; + type PullsGetReviewResponseLinksHtml = { href: string }; + type PullsGetReviewResponseLinks = { + html: PullsGetReviewResponseLinksHtml; + pull_request: PullsGetReviewResponseLinksPullRequest; + }; + type PullsGetReviewResponse = { + _links: PullsGetReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + submitted_at: string; + user: PullsGetReviewResponseUser; + }; + type PullsGetCommentsForReviewResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetCommentsForReviewResponseItemLinksSelf = { href: string }; + type PullsGetCommentsForReviewResponseItemLinksPullRequest = { href: string }; + type PullsGetCommentsForReviewResponseItemLinksHtml = { href: string }; + type PullsGetCommentsForReviewResponseItemLinks = { + html: PullsGetCommentsForReviewResponseItemLinksHtml; + pull_request: PullsGetCommentsForReviewResponseItemLinksPullRequest; + self: PullsGetCommentsForReviewResponseItemLinksSelf; + }; + type PullsGetCommentsForReviewResponseItem = { + _links: PullsGetCommentsForReviewResponseItemLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + node_id: string; + original_commit_id: string; + original_position: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + updated_at: string; + url: string; + user: PullsGetCommentsForReviewResponseItemUser; + }; + type PullsGetCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetCommentResponseLinksSelf = { href: string }; + type PullsGetCommentResponseLinksPullRequest = { href: string }; + type PullsGetCommentResponseLinksHtml = { href: string }; + type PullsGetCommentResponseLinks = { + html: PullsGetCommentResponseLinksHtml; + pull_request: PullsGetCommentResponseLinksPullRequest; + self: PullsGetCommentResponseLinksSelf; + }; + type PullsGetCommentResponse = { + _links: PullsGetCommentResponseLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsGetCommentResponseUser; + }; + type PullsGetResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsGetResponseRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsGetResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsGetResponseMergedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsGetResponseHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsGetResponseHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsGetResponseHeadRepoOwner; + permissions: PullsGetResponseHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsGetResponseHead = { + label: string; + ref: string; + repo: PullsGetResponseHeadRepo; + sha: string; + user: PullsGetResponseHeadUser; + }; + type PullsGetResponseBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsGetResponseBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsGetResponseBaseRepoOwner; + permissions: PullsGetResponseBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsGetResponseBase = { + label: string; + ref: string; + repo: PullsGetResponseBaseRepo; + sha: string; + user: PullsGetResponseBaseUser; + }; + type PullsGetResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseLinksStatuses = { href: string }; + type PullsGetResponseLinksSelf = { href: string }; + type PullsGetResponseLinksReviewComments = { href: string }; + type PullsGetResponseLinksReviewComment = { href: string }; + type PullsGetResponseLinksIssue = { href: string }; + type PullsGetResponseLinksHtml = { href: string }; + type PullsGetResponseLinksCommits = { href: string }; + type PullsGetResponseLinksComments = { href: string }; + type PullsGetResponseLinks = { + comments: PullsGetResponseLinksComments; + commits: PullsGetResponseLinksCommits; + html: PullsGetResponseLinksHtml; + issue: PullsGetResponseLinksIssue; + review_comment: PullsGetResponseLinksReviewComment; + review_comments: PullsGetResponseLinksReviewComments; + self: PullsGetResponseLinksSelf; + statuses: PullsGetResponseLinksStatuses; + }; + type PullsGetResponse = { + _links: PullsGetResponseLinks; + active_lock_reason: string; + additions: number; + assignee: PullsGetResponseAssignee; + assignees: Array; + author_association: string; + base: PullsGetResponseBase; + body: string; + changed_files: number; + closed_at: string; + comments: number; + comments_url: string; + commits: number; + commits_url: string; + created_at: string; + deletions: number; + diff_url: string; + draft: boolean; + head: PullsGetResponseHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + maintainer_can_modify: boolean; + merge_commit_sha: string; + mergeable: boolean; + mergeable_state: string; + merged: boolean; + merged_at: string; + merged_by: PullsGetResponseMergedBy; + milestone: PullsGetResponseMilestone; + node_id: string; + number: number; + patch_url: string; + rebaseable: boolean; + requested_reviewers: Array; + requested_teams: Array; + review_comment_url: string; + review_comments: number; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsGetResponseUser; + }; + type PullsDismissReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsDismissReviewResponseLinksPullRequest = { href: string }; + type PullsDismissReviewResponseLinksHtml = { href: string }; + type PullsDismissReviewResponseLinks = { + html: PullsDismissReviewResponseLinksHtml; + pull_request: PullsDismissReviewResponseLinksPullRequest; + }; + type PullsDismissReviewResponse = { + _links: PullsDismissReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsDismissReviewResponseUser; + }; + type PullsDeletePendingReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsDeletePendingReviewResponseLinksPullRequest = { href: string }; + type PullsDeletePendingReviewResponseLinksHtml = { href: string }; + type PullsDeletePendingReviewResponseLinks = { + html: PullsDeletePendingReviewResponseLinksHtml; + pull_request: PullsDeletePendingReviewResponseLinksPullRequest; + }; + type PullsDeletePendingReviewResponse = { + _links: PullsDeletePendingReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsDeletePendingReviewResponseUser; + }; + type PullsCreateReviewRequestResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsCreateReviewRequestResponseRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsCreateReviewRequestResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsCreateReviewRequestResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsCreateReviewRequestResponseHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateReviewRequestResponseHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateReviewRequestResponseHeadRepoOwner; + permissions: PullsCreateReviewRequestResponseHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsCreateReviewRequestResponseHead = { + label: string; + ref: string; + repo: PullsCreateReviewRequestResponseHeadRepo; + sha: string; + user: PullsCreateReviewRequestResponseHeadUser; + }; + type PullsCreateReviewRequestResponseBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateReviewRequestResponseBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateReviewRequestResponseBaseRepoOwner; + permissions: PullsCreateReviewRequestResponseBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsCreateReviewRequestResponseBase = { + label: string; + ref: string; + repo: PullsCreateReviewRequestResponseBaseRepo; + sha: string; + user: PullsCreateReviewRequestResponseBaseUser; + }; + type PullsCreateReviewRequestResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseLinksStatuses = { href: string }; + type PullsCreateReviewRequestResponseLinksSelf = { href: string }; + type PullsCreateReviewRequestResponseLinksReviewComments = { href: string }; + type PullsCreateReviewRequestResponseLinksReviewComment = { href: string }; + type PullsCreateReviewRequestResponseLinksIssue = { href: string }; + type PullsCreateReviewRequestResponseLinksHtml = { href: string }; + type PullsCreateReviewRequestResponseLinksCommits = { href: string }; + type PullsCreateReviewRequestResponseLinksComments = { href: string }; + type PullsCreateReviewRequestResponseLinks = { + comments: PullsCreateReviewRequestResponseLinksComments; + commits: PullsCreateReviewRequestResponseLinksCommits; + html: PullsCreateReviewRequestResponseLinksHtml; + issue: PullsCreateReviewRequestResponseLinksIssue; + review_comment: PullsCreateReviewRequestResponseLinksReviewComment; + review_comments: PullsCreateReviewRequestResponseLinksReviewComments; + self: PullsCreateReviewRequestResponseLinksSelf; + statuses: PullsCreateReviewRequestResponseLinksStatuses; + }; + type PullsCreateReviewRequestResponse = { + _links: PullsCreateReviewRequestResponseLinks; + active_lock_reason: string; + assignee: PullsCreateReviewRequestResponseAssignee; + assignees: Array; + author_association: string; + base: PullsCreateReviewRequestResponseBase; + body: string; + closed_at: string; + comments_url: string; + commits_url: string; + created_at: string; + diff_url: string; + draft: boolean; + head: PullsCreateReviewRequestResponseHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + merge_commit_sha: string; + merged_at: string; + milestone: PullsCreateReviewRequestResponseMilestone; + node_id: string; + number: number; + patch_url: string; + requested_reviewers: Array< + PullsCreateReviewRequestResponseRequestedReviewersItem + >; + requested_teams: Array; + review_comment_url: string; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsCreateReviewRequestResponseUser; + }; + type PullsCreateReviewCommentReplyResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewCommentReplyResponseLinksSelf = { href: string }; + type PullsCreateReviewCommentReplyResponseLinksPullRequest = { href: string }; + type PullsCreateReviewCommentReplyResponseLinksHtml = { href: string }; + type PullsCreateReviewCommentReplyResponseLinks = { + html: PullsCreateReviewCommentReplyResponseLinksHtml; + pull_request: PullsCreateReviewCommentReplyResponseLinksPullRequest; + self: PullsCreateReviewCommentReplyResponseLinksSelf; + }; + type PullsCreateReviewCommentReplyResponse = { + _links: PullsCreateReviewCommentReplyResponseLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + node_id: string; + original_commit_id: string; + original_position: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + updated_at: string; + url: string; + user: PullsCreateReviewCommentReplyResponseUser; + }; + type PullsCreateReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewResponseLinksPullRequest = { href: string }; + type PullsCreateReviewResponseLinksHtml = { href: string }; + type PullsCreateReviewResponseLinks = { + html: PullsCreateReviewResponseLinksHtml; + pull_request: PullsCreateReviewResponseLinksPullRequest; + }; + type PullsCreateReviewResponse = { + _links: PullsCreateReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsCreateReviewResponseUser; + }; + type PullsCreateFromIssueResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsCreateFromIssueResponseRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsCreateFromIssueResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsCreateFromIssueResponseMergedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsCreateFromIssueResponseHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateFromIssueResponseHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateFromIssueResponseHeadRepoOwner; + permissions: PullsCreateFromIssueResponseHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsCreateFromIssueResponseHead = { + label: string; + ref: string; + repo: PullsCreateFromIssueResponseHeadRepo; + sha: string; + user: PullsCreateFromIssueResponseHeadUser; + }; + type PullsCreateFromIssueResponseBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateFromIssueResponseBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateFromIssueResponseBaseRepoOwner; + permissions: PullsCreateFromIssueResponseBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsCreateFromIssueResponseBase = { + label: string; + ref: string; + repo: PullsCreateFromIssueResponseBaseRepo; + sha: string; + user: PullsCreateFromIssueResponseBaseUser; + }; + type PullsCreateFromIssueResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseLinksStatuses = { href: string }; + type PullsCreateFromIssueResponseLinksSelf = { href: string }; + type PullsCreateFromIssueResponseLinksReviewComments = { href: string }; + type PullsCreateFromIssueResponseLinksReviewComment = { href: string }; + type PullsCreateFromIssueResponseLinksIssue = { href: string }; + type PullsCreateFromIssueResponseLinksHtml = { href: string }; + type PullsCreateFromIssueResponseLinksCommits = { href: string }; + type PullsCreateFromIssueResponseLinksComments = { href: string }; + type PullsCreateFromIssueResponseLinks = { + comments: PullsCreateFromIssueResponseLinksComments; + commits: PullsCreateFromIssueResponseLinksCommits; + html: PullsCreateFromIssueResponseLinksHtml; + issue: PullsCreateFromIssueResponseLinksIssue; + review_comment: PullsCreateFromIssueResponseLinksReviewComment; + review_comments: PullsCreateFromIssueResponseLinksReviewComments; + self: PullsCreateFromIssueResponseLinksSelf; + statuses: PullsCreateFromIssueResponseLinksStatuses; + }; + type PullsCreateFromIssueResponse = { + _links: PullsCreateFromIssueResponseLinks; + active_lock_reason: string; + additions: number; + assignee: PullsCreateFromIssueResponseAssignee; + assignees: Array; + author_association: string; + base: PullsCreateFromIssueResponseBase; + body: string; + changed_files: number; + closed_at: string; + comments: number; + comments_url: string; + commits: number; + commits_url: string; + created_at: string; + deletions: number; + diff_url: string; + draft: boolean; + head: PullsCreateFromIssueResponseHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + maintainer_can_modify: boolean; + merge_commit_sha: string; + mergeable: boolean; + mergeable_state: string; + merged: boolean; + merged_at: string; + merged_by: PullsCreateFromIssueResponseMergedBy; + milestone: PullsCreateFromIssueResponseMilestone; + node_id: string; + number: number; + patch_url: string; + rebaseable: boolean; + requested_reviewers: Array< + PullsCreateFromIssueResponseRequestedReviewersItem + >; + requested_teams: Array; + review_comment_url: string; + review_comments: number; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsCreateFromIssueResponseUser; + }; + type PullsCreateCommentReplyResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateCommentReplyResponseLinksSelf = { href: string }; + type PullsCreateCommentReplyResponseLinksPullRequest = { href: string }; + type PullsCreateCommentReplyResponseLinksHtml = { href: string }; + type PullsCreateCommentReplyResponseLinks = { + html: PullsCreateCommentReplyResponseLinksHtml; + pull_request: PullsCreateCommentReplyResponseLinksPullRequest; + self: PullsCreateCommentReplyResponseLinksSelf; + }; + type PullsCreateCommentReplyResponse = { + _links: PullsCreateCommentReplyResponseLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsCreateCommentReplyResponseUser; + }; + type PullsCreateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateCommentResponseLinksSelf = { href: string }; + type PullsCreateCommentResponseLinksPullRequest = { href: string }; + type PullsCreateCommentResponseLinksHtml = { href: string }; + type PullsCreateCommentResponseLinks = { + html: PullsCreateCommentResponseLinksHtml; + pull_request: PullsCreateCommentResponseLinksPullRequest; + self: PullsCreateCommentResponseLinksSelf; + }; + type PullsCreateCommentResponse = { + _links: PullsCreateCommentResponseLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsCreateCommentResponseUser; + }; + type PullsCreateResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsCreateResponseRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsCreateResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsCreateResponseMergedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsCreateResponseHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateResponseHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateResponseHeadRepoOwner; + permissions: PullsCreateResponseHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsCreateResponseHead = { + label: string; + ref: string; + repo: PullsCreateResponseHeadRepo; + sha: string; + user: PullsCreateResponseHeadUser; + }; + type PullsCreateResponseBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateResponseBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateResponseBaseRepoOwner; + permissions: PullsCreateResponseBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type PullsCreateResponseBase = { + label: string; + ref: string; + repo: PullsCreateResponseBaseRepo; + sha: string; + user: PullsCreateResponseBaseUser; + }; + type PullsCreateResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseLinksStatuses = { href: string }; + type PullsCreateResponseLinksSelf = { href: string }; + type PullsCreateResponseLinksReviewComments = { href: string }; + type PullsCreateResponseLinksReviewComment = { href: string }; + type PullsCreateResponseLinksIssue = { href: string }; + type PullsCreateResponseLinksHtml = { href: string }; + type PullsCreateResponseLinksCommits = { href: string }; + type PullsCreateResponseLinksComments = { href: string }; + type PullsCreateResponseLinks = { + comments: PullsCreateResponseLinksComments; + commits: PullsCreateResponseLinksCommits; + html: PullsCreateResponseLinksHtml; + issue: PullsCreateResponseLinksIssue; + review_comment: PullsCreateResponseLinksReviewComment; + review_comments: PullsCreateResponseLinksReviewComments; + self: PullsCreateResponseLinksSelf; + statuses: PullsCreateResponseLinksStatuses; + }; + type PullsCreateResponse = { + _links: PullsCreateResponseLinks; + active_lock_reason: string; + additions: number; + assignee: PullsCreateResponseAssignee; + assignees: Array; + author_association: string; + base: PullsCreateResponseBase; + body: string; + changed_files: number; + closed_at: string; + comments: number; + comments_url: string; + commits: number; + commits_url: string; + created_at: string; + deletions: number; + diff_url: string; + draft: boolean; + head: PullsCreateResponseHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + maintainer_can_modify: boolean; + merge_commit_sha: string; + mergeable: boolean; + mergeable_state: string; + merged: boolean; + merged_at: string; + merged_by: PullsCreateResponseMergedBy; + milestone: PullsCreateResponseMilestone; + node_id: string; + number: number; + patch_url: string; + rebaseable: boolean; + requested_reviewers: Array; + requested_teams: Array; + review_comment_url: string; + review_comments: number; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsCreateResponseUser; + }; + type ProjectsUpdateColumnResponse = { + cards_url: string; + created_at: string; + id: number; + name: string; + node_id: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsUpdateCardResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsUpdateCardResponse = { + archived: boolean; + column_url: string; + content_url: string; + created_at: string; + creator: ProjectsUpdateCardResponseCreator; + id: number; + node_id: string; + note: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsUpdateResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsUpdateResponse = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsUpdateResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsReviewUserPermissionLevelResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsReviewUserPermissionLevelResponse = { + permission: string; + user: ProjectsReviewUserPermissionLevelResponseUser; + }; + type ProjectsListForUserResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsListForUserResponseItem = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsListForUserResponseItemCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsListForRepoResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsListForRepoResponseItem = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsListForRepoResponseItemCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsListForOrgResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsListForOrgResponseItem = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsListForOrgResponseItemCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsListColumnsResponseItem = { + cards_url: string; + created_at: string; + id: number; + name: string; + node_id: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsListCollaboratorsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsListCardsResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsListCardsResponseItem = { + archived: boolean; + column_url: string; + content_url: string; + created_at: string; + creator: ProjectsListCardsResponseItemCreator; + id: number; + node_id: string; + note: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsGetColumnResponse = { + cards_url: string; + created_at: string; + id: number; + name: string; + node_id: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsGetCardResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsGetCardResponse = { + archived: boolean; + column_url: string; + content_url: string; + created_at: string; + creator: ProjectsGetCardResponseCreator; + id: number; + node_id: string; + note: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsGetResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsGetResponse = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsGetResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsCreateForRepoResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsCreateForRepoResponse = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsCreateForRepoResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsCreateForOrgResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsCreateForOrgResponse = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsCreateForOrgResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsCreateForAuthenticatedUserResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsCreateForAuthenticatedUserResponse = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsCreateForAuthenticatedUserResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsCreateColumnResponse = { + cards_url: string; + created_at: string; + id: number; + name: string; + node_id: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsCreateCardResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsCreateCardResponse = { + archived: boolean; + column_url: string; + content_url: string; + created_at: string; + creator: ProjectsCreateCardResponseCreator; + id: number; + node_id: string; + note: string; + project_url: string; + updated_at: string; + url: string; + }; + type OrgsUpdateMembershipResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsUpdateMembershipResponseOrganization = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsUpdateMembershipResponse = { + organization: OrgsUpdateMembershipResponseOrganization; + organization_url: string; + role: string; + state: string; + url: string; + user: OrgsUpdateMembershipResponseUser; + }; + type OrgsUpdateHookResponseConfig = { content_type: string; url: string }; + type OrgsUpdateHookResponse = { + active: boolean; + config: OrgsUpdateHookResponseConfig; + created_at: string; + events: Array; + id: number; + name: string; + ping_url: string; + updated_at: string; + url: string; + }; + type OrgsUpdateResponsePlan = { + name: string; + private_repos: number; + space: number; + }; + type OrgsUpdateResponse = { + avatar_url: string; + billing_email: string; + blog: string; + collaborators: number; + company: string; + created_at: string; + default_repository_settings: string; + description: string; + disk_usage: number; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_allowed_repository_creation_type: string; + members_can_create_internal_repositories: boolean; + members_can_create_private_repositories: boolean; + members_can_create_public_repositories: boolean; + members_can_create_repositories: boolean; + members_url: string; + name: string; + node_id: string; + owned_private_repos: number; + plan: OrgsUpdateResponsePlan; + private_gists: number; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + total_private_repos: number; + two_factor_requirement_enabled: boolean; + type: string; + url: string; + }; + type OrgsRemoveOutsideCollaboratorResponse = { + documentation_url: string; + message: string; + }; + type OrgsListPublicMembersResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListPendingInvitationsResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListPendingInvitationsResponseItem = { + created_at: string; + email: string; + id: number; + invitation_team_url: string; + inviter: OrgsListPendingInvitationsResponseItemInviter; + login: string; + role: string; + team_count: number; + }; + type OrgsListOutsideCollaboratorsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListMembershipsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListMembershipsResponseItemOrganization = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsListMembershipsResponseItem = { + organization: OrgsListMembershipsResponseItemOrganization; + organization_url: string; + role: string; + state: string; + url: string; + user: OrgsListMembershipsResponseItemUser; + }; + type OrgsListMembersResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListInvitationTeamsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type OrgsListInstallationsResponseInstallationsItemPermissions = { + deployments: string; + metadata: string; + pull_requests: string; + statuses: string; + }; + type OrgsListInstallationsResponseInstallationsItemAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListInstallationsResponseInstallationsItem = { + access_tokens_url: string; + account: OrgsListInstallationsResponseInstallationsItemAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: OrgsListInstallationsResponseInstallationsItemPermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type OrgsListInstallationsResponse = { + installations: Array; + total_count: number; + }; + type OrgsListHooksResponseItemConfig = { content_type: string; url: string }; + type OrgsListHooksResponseItem = { + active: boolean; + config: OrgsListHooksResponseItemConfig; + created_at: string; + events: Array; + id: number; + name: string; + ping_url: string; + updated_at: string; + url: string; + }; + type OrgsListForUserResponseItem = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsListForAuthenticatedUserResponseItem = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsListBlockedUsersResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListResponseItem = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsGetMembershipForAuthenticatedUserResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsGetMembershipForAuthenticatedUserResponseOrganization = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsGetMembershipForAuthenticatedUserResponse = { + organization: OrgsGetMembershipForAuthenticatedUserResponseOrganization; + organization_url: string; + role: string; + state: string; + url: string; + user: OrgsGetMembershipForAuthenticatedUserResponseUser; + }; + type OrgsGetMembershipResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsGetMembershipResponseOrganization = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsGetMembershipResponse = { + organization: OrgsGetMembershipResponseOrganization; + organization_url: string; + role: string; + state: string; + url: string; + user: OrgsGetMembershipResponseUser; + }; + type OrgsGetHookResponseConfig = { content_type: string; url: string }; + type OrgsGetHookResponse = { + active: boolean; + config: OrgsGetHookResponseConfig; + created_at: string; + events: Array; + id: number; + name: string; + ping_url: string; + updated_at: string; + url: string; + }; + type OrgsGetResponsePlan = { + name: string; + private_repos: number; + space: number; + filled_seats?: number; + seats?: number; + }; + type OrgsGetResponse = { + avatar_url: string; + billing_email?: string; + blog: string; + collaborators?: number; + company: string; + created_at: string; + default_repository_settings?: string; + description: string; + disk_usage?: number; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_allowed_repository_creation_type?: string; + members_can_create_internal_repositories?: boolean; + members_can_create_private_repositories?: boolean; + members_can_create_public_repositories?: boolean; + members_can_create_repositories?: boolean; + members_url: string; + name: string; + node_id: string; + owned_private_repos?: number; + plan: OrgsGetResponsePlan; + private_gists?: number; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + total_private_repos?: number; + two_factor_requirement_enabled?: boolean; + type: string; + url: string; + }; + type OrgsCreateInvitationResponseInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsCreateInvitationResponse = { + created_at: string; + email: string; + id: number; + invitation_team_url: string; + inviter: OrgsCreateInvitationResponseInviter; + login: string; + role: string; + team_count: number; + }; + type OrgsCreateHookResponseConfig = { content_type: string; url: string }; + type OrgsCreateHookResponse = { + active: boolean; + config: OrgsCreateHookResponseConfig; + created_at: string; + events: Array; + id: number; + name: string; + ping_url: string; + updated_at: string; + url: string; + }; + type OrgsConvertMemberToOutsideCollaboratorResponse = { + documentation_url: string; + message: string; + }; + type OrgsAddOrUpdateMembershipResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsAddOrUpdateMembershipResponseOrganization = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsAddOrUpdateMembershipResponse = { + organization: OrgsAddOrUpdateMembershipResponseOrganization; + organization_url: string; + role: string; + state: string; + url: string; + user: OrgsAddOrUpdateMembershipResponseUser; + }; + type OauthAuthorizationsUpdateAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsUpdateAuthorizationResponse = { + app: OauthAuthorizationsUpdateAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsResetAuthorizationResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OauthAuthorizationsResetAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsResetAuthorizationResponse = { + app: OauthAuthorizationsResetAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: OauthAuthorizationsResetAuthorizationResponseUser; + }; + type OauthAuthorizationsListGrantsResponseItemApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsListGrantsResponseItem = { + app: OauthAuthorizationsListGrantsResponseItemApp; + created_at: string; + id: number; + scopes: Array; + updated_at: string; + url: string; + }; + type OauthAuthorizationsListAuthorizationsResponseItemApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsListAuthorizationsResponseItem = { + app: OauthAuthorizationsListAuthorizationsResponseItemApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintResponse = { + app: OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintResponse = { + app: OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppResponse = { + app: OauthAuthorizationsGetOrCreateAuthorizationForAppResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsGetGrantResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsGetGrantResponse = { + app: OauthAuthorizationsGetGrantResponseApp; + created_at: string; + id: number; + scopes: Array; + updated_at: string; + url: string; + }; + type OauthAuthorizationsGetAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsGetAuthorizationResponse = { + app: OauthAuthorizationsGetAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsCreateAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsCreateAuthorizationResponse = { + app: OauthAuthorizationsCreateAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsCheckAuthorizationResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OauthAuthorizationsCheckAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsCheckAuthorizationResponse = { + app: OauthAuthorizationsCheckAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: OauthAuthorizationsCheckAuthorizationResponseUser; + }; + type MigrationsUpdateImportResponse = { + authors_url: string; + html_url: string; + repository_url: string; + status: string; + url: string; + use_lfs: string; + vcs: string; + vcs_url: string; + authors_count?: number; + commit_count?: number; + has_large_files?: boolean; + large_files_count?: number; + large_files_size?: number; + percent?: number; + status_text?: string; + tfvc_project?: string; + }; + type MigrationsStartImportResponse = { + authors_count: number; + authors_url: string; + commit_count: number; + has_large_files: boolean; + html_url: string; + large_files_count: number; + large_files_size: number; + percent: number; + repository_url: string; + status: string; + status_text: string; + url: string; + use_lfs: string; + vcs: string; + vcs_url: string; + }; + type MigrationsStartForOrgResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsStartForOrgResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsStartForOrgResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsStartForOrgResponseRepositoriesItemOwner; + permissions: MigrationsStartForOrgResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type MigrationsStartForOrgResponseOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type MigrationsStartForOrgResponse = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsStartForOrgResponseOwner; + repositories: Array; + state: string; + updated_at: string; + url: string; + }; + type MigrationsStartForAuthenticatedUserResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsStartForAuthenticatedUserResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsStartForAuthenticatedUserResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsStartForAuthenticatedUserResponseRepositoriesItemOwner; + permissions: MigrationsStartForAuthenticatedUserResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type MigrationsStartForAuthenticatedUserResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsStartForAuthenticatedUserResponse = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsStartForAuthenticatedUserResponseOwner; + repositories: Array< + MigrationsStartForAuthenticatedUserResponseRepositoriesItem + >; + state: string; + updated_at: string; + url: string; + }; + type MigrationsSetLfsPreferenceResponse = { + authors_count: number; + authors_url: string; + has_large_files: boolean; + html_url: string; + large_files_count: number; + large_files_size: number; + repository_url: string; + status: string; + status_text: string; + url: string; + use_lfs: string; + vcs: string; + vcs_url: string; + }; + type MigrationsMapCommitAuthorResponse = { + email: string; + id: number; + import_url: string; + name: string; + remote_id: string; + remote_name: string; + url: string; + }; + type MigrationsListReposForUserResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsListReposForUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsListReposForUserResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type MigrationsListReposForUserResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: MigrationsListReposForUserResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsListReposForUserResponseItemOwner; + permissions: MigrationsListReposForUserResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type MigrationsListReposForOrgResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsListReposForOrgResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsListReposForOrgResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type MigrationsListReposForOrgResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: MigrationsListReposForOrgResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsListReposForOrgResponseItemOwner; + permissions: MigrationsListReposForOrgResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type MigrationsListForOrgResponseItemRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsListForOrgResponseItemRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsListForOrgResponseItemRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsListForOrgResponseItemRepositoriesItemOwner; + permissions: MigrationsListForOrgResponseItemRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type MigrationsListForOrgResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type MigrationsListForOrgResponseItem = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsListForOrgResponseItemOwner; + repositories: Array; + state: string; + updated_at: string; + url: string; + }; + type MigrationsListForAuthenticatedUserResponseItemRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsListForAuthenticatedUserResponseItemRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsListForAuthenticatedUserResponseItemRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsListForAuthenticatedUserResponseItemRepositoriesItemOwner; + permissions: MigrationsListForAuthenticatedUserResponseItemRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type MigrationsListForAuthenticatedUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsListForAuthenticatedUserResponseItem = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsListForAuthenticatedUserResponseItemOwner; + repositories: Array< + MigrationsListForAuthenticatedUserResponseItemRepositoriesItem + >; + state: string; + updated_at: string; + url: string; + }; + type MigrationsGetStatusForOrgResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsGetStatusForOrgResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsGetStatusForOrgResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsGetStatusForOrgResponseRepositoriesItemOwner; + permissions: MigrationsGetStatusForOrgResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type MigrationsGetStatusForOrgResponseOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type MigrationsGetStatusForOrgResponse = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsGetStatusForOrgResponseOwner; + repositories: Array; + state: string; + updated_at: string; + url: string; + }; + type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemOwner; + permissions: MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type MigrationsGetStatusForAuthenticatedUserResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsGetStatusForAuthenticatedUserResponse = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsGetStatusForAuthenticatedUserResponseOwner; + repositories: Array< + MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItem + >; + state: string; + updated_at: string; + url: string; + }; + type MigrationsGetLargeFilesResponseItem = { + oid: string; + path: string; + ref_name: string; + size: number; + }; + type MigrationsGetImportProgressResponse = { + authors_count: number; + authors_url: string; + has_large_files: boolean; + html_url: string; + large_files_count: number; + large_files_size: number; + repository_url: string; + status: string; + status_text: string; + url: string; + use_lfs: string; + vcs: string; + vcs_url: string; + }; + type MigrationsGetCommitAuthorsResponseItem = { + email: string; + id: number; + import_url: string; + name: string; + remote_id: string; + remote_name: string; + url: string; + }; + type MetaGetResponseSshKeyFingerprints = { + MD5_DSA: string; + MD5_RSA: string; + SHA256_DSA: string; + SHA256_RSA: string; + }; + type MetaGetResponse = { + api: Array; + git: Array; + hooks: Array; + importer: Array; + pages: Array; + ssh_key_fingerprints: MetaGetResponseSshKeyFingerprints; + verifiable_password_authentication: boolean; + web: Array; + }; + type LicensesListCommonlyUsedResponseItem = { + key: string; + name: string; + node_id?: string; + spdx_id: string; + url: string; + }; + type LicensesListResponseItem = { + key: string; + name: string; + node_id?: string; + spdx_id: string; + url: string; + }; + type LicensesGetForRepoResponseLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type LicensesGetForRepoResponseLinks = { + git: string; + html: string; + self: string; + }; + type LicensesGetForRepoResponse = { + _links: LicensesGetForRepoResponseLinks; + content: string; + download_url: string; + encoding: string; + git_url: string; + html_url: string; + license: LicensesGetForRepoResponseLicense; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type LicensesGetResponse = { + body: string; + conditions: Array; + description: string; + featured: boolean; + html_url: string; + implementation: string; + key: string; + limitations: Array; + name: string; + node_id: string; + permissions: Array; + spdx_id: string; + url: string; + }; + type IssuesUpdateMilestoneResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateMilestoneResponse = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesUpdateMilestoneResponseCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesUpdateLabelResponse = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesUpdateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateCommentResponse = { + body: string; + created_at: string; + html_url: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: IssuesUpdateCommentResponseUser; + }; + type IssuesUpdateResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateResponsePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesUpdateResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesUpdateResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesUpdateResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesUpdateResponseClosedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateResponse = { + active_lock_reason: string; + assignee: IssuesUpdateResponseAssignee; + assignees: Array; + body: string; + closed_at: null; + closed_by: IssuesUpdateResponseClosedBy; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesUpdateResponseMilestone; + node_id: string; + number: number; + pull_request: IssuesUpdateResponsePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesUpdateResponseUser; + }; + type IssuesReplaceLabelsResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesRemoveLabelResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesRemoveAssigneesResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesRemoveAssigneesResponsePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesRemoveAssigneesResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesRemoveAssigneesResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesRemoveAssigneesResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesRemoveAssigneesResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesRemoveAssigneesResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesRemoveAssigneesResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesRemoveAssigneesResponse = { + active_lock_reason: string; + assignee: IssuesRemoveAssigneesResponseAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesRemoveAssigneesResponseMilestone; + node_id: string; + number: number; + pull_request: IssuesRemoveAssigneesResponsePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesRemoveAssigneesResponseUser; + }; + type IssuesListMilestonesForRepoResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListMilestonesForRepoResponseItem = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListMilestonesForRepoResponseItemCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListLabelsOnIssueResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListLabelsForRepoResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListLabelsForMilestoneResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListForRepoResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForRepoResponseItemPullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesListForRepoResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForRepoResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListForRepoResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListForRepoResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListForRepoResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForRepoResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForRepoResponseItem = { + active_lock_reason: string; + assignee: IssuesListForRepoResponseItemAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesListForRepoResponseItemMilestone; + node_id: string; + number: number; + pull_request: IssuesListForRepoResponseItemPullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesListForRepoResponseItemUser; + }; + type IssuesListForOrgResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForOrgResponseItemRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type IssuesListForOrgResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForOrgResponseItemRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: IssuesListForOrgResponseItemRepositoryOwner; + permissions: IssuesListForOrgResponseItemRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type IssuesListForOrgResponseItemPullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesListForOrgResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForOrgResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListForOrgResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListForOrgResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListForOrgResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForOrgResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForOrgResponseItem = { + active_lock_reason: string; + assignee: IssuesListForOrgResponseItemAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesListForOrgResponseItemMilestone; + node_id: string; + number: number; + pull_request: IssuesListForOrgResponseItemPullRequest; + repository: IssuesListForOrgResponseItemRepository; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesListForOrgResponseItemUser; + }; + type IssuesListForAuthenticatedUserResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type IssuesListForAuthenticatedUserResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: IssuesListForAuthenticatedUserResponseItemRepositoryOwner; + permissions: IssuesListForAuthenticatedUserResponseItemRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type IssuesListForAuthenticatedUserResponseItemPullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListForAuthenticatedUserResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItem = { + active_lock_reason: string; + assignee: IssuesListForAuthenticatedUserResponseItemAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesListForAuthenticatedUserResponseItemMilestone; + node_id: string; + number: number; + pull_request: IssuesListForAuthenticatedUserResponseItemPullRequest; + repository: IssuesListForAuthenticatedUserResponseItemRepository; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesListForAuthenticatedUserResponseItemUser; + }; + type IssuesListEventsForTimelineResponseItemActor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForTimelineResponseItem = { + actor: IssuesListEventsForTimelineResponseItemActor; + commit_id: string; + commit_url: string; + created_at: string; + event: string; + id: number; + node_id: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssuePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListEventsForRepoResponseItemIssueMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssue = { + active_lock_reason: string; + assignee: IssuesListEventsForRepoResponseItemIssueAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesListEventsForRepoResponseItemIssueMilestone; + node_id: string; + number: number; + pull_request: IssuesListEventsForRepoResponseItemIssuePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesListEventsForRepoResponseItemIssueUser; + }; + type IssuesListEventsForRepoResponseItemActor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForRepoResponseItem = { + actor: IssuesListEventsForRepoResponseItemActor; + commit_id: string; + commit_url: string; + created_at: string; + event: string; + id: number; + issue: IssuesListEventsForRepoResponseItemIssue; + node_id: string; + url: string; + }; + type IssuesListEventsResponseItemActor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsResponseItem = { + actor: IssuesListEventsResponseItemActor; + commit_id: string; + commit_url: string; + created_at: string; + event: string; + id: number; + node_id: string; + url: string; + }; + type IssuesListCommentsForRepoResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListCommentsForRepoResponseItem = { + body: string; + created_at: string; + html_url: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: IssuesListCommentsForRepoResponseItemUser; + }; + type IssuesListCommentsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListCommentsResponseItem = { + body: string; + created_at: string; + html_url: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: IssuesListCommentsResponseItemUser; + }; + type IssuesListAssigneesResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItemRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type IssuesListResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItemRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: IssuesListResponseItemRepositoryOwner; + permissions: IssuesListResponseItemRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type IssuesListResponseItemPullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesListResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItem = { + active_lock_reason: string; + assignee: IssuesListResponseItemAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesListResponseItemMilestone; + node_id: string; + number: number; + pull_request: IssuesListResponseItemPullRequest; + repository: IssuesListResponseItemRepository; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesListResponseItemUser; + }; + type IssuesGetMilestoneResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetMilestoneResponse = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesGetMilestoneResponseCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesGetLabelResponse = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesGetEventResponseIssueUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetEventResponseIssuePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesGetEventResponseIssueMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetEventResponseIssueMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesGetEventResponseIssueMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesGetEventResponseIssueLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesGetEventResponseIssueAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetEventResponseIssueAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetEventResponseIssue = { + active_lock_reason: string; + assignee: IssuesGetEventResponseIssueAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesGetEventResponseIssueMilestone; + node_id: string; + number: number; + pull_request: IssuesGetEventResponseIssuePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesGetEventResponseIssueUser; + }; + type IssuesGetEventResponseActor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetEventResponse = { + actor: IssuesGetEventResponseActor; + commit_id: string; + commit_url: string; + created_at: string; + event: string; + id: number; + issue: IssuesGetEventResponseIssue; + node_id: string; + url: string; + }; + type IssuesGetCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetCommentResponse = { + body: string; + created_at: string; + html_url: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: IssuesGetCommentResponseUser; + }; + type IssuesGetResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetResponsePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesGetResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesGetResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesGetResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesGetResponseClosedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetResponse = { + active_lock_reason: string; + assignee: IssuesGetResponseAssignee; + assignees: Array; + body: string; + closed_at: null; + closed_by: IssuesGetResponseClosedBy; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesGetResponseMilestone; + node_id: string; + number: number; + pull_request: IssuesGetResponsePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesGetResponseUser; + }; + type IssuesCreateMilestoneResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateMilestoneResponse = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesCreateMilestoneResponseCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesCreateLabelResponse = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesCreateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateCommentResponse = { + body: string; + created_at: string; + html_url: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: IssuesCreateCommentResponseUser; + }; + type IssuesCreateResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateResponsePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesCreateResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesCreateResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesCreateResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesCreateResponseClosedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateResponse = { + active_lock_reason: string; + assignee: IssuesCreateResponseAssignee; + assignees: Array; + body: string; + closed_at: null; + closed_by: IssuesCreateResponseClosedBy; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesCreateResponseMilestone; + node_id: string; + number: number; + pull_request: IssuesCreateResponsePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesCreateResponseUser; + }; + type IssuesAddLabelsResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesAddAssigneesResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesAddAssigneesResponsePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesAddAssigneesResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesAddAssigneesResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesAddAssigneesResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesAddAssigneesResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesAddAssigneesResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesAddAssigneesResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesAddAssigneesResponse = { + active_lock_reason: string; + assignee: IssuesAddAssigneesResponseAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesAddAssigneesResponseMilestone; + node_id: string; + number: number; + pull_request: IssuesAddAssigneesResponsePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesAddAssigneesResponseUser; + }; + type InteractionsGetRestrictionsForRepoResponse = { + expires_at: string; + limit: string; + origin: string; + }; + type InteractionsGetRestrictionsForOrgResponse = { + expires_at: string; + limit: string; + origin: string; + }; + type InteractionsAddOrUpdateRestrictionsForRepoResponse = { + expires_at: string; + limit: string; + origin: string; + }; + type InteractionsAddOrUpdateRestrictionsForOrgResponse = { + expires_at: string; + limit: string; + origin: string; + }; + type GitignoreGetTemplateResponse = { name: string; source: string }; + type GitUpdateRefResponseObject = { sha: string; type: string; url: string }; + type GitUpdateRefResponse = { + node_id: string; + object: GitUpdateRefResponseObject; + ref: string; + url: string; + }; + type GitListMatchingRefsResponseItemObject = { + sha: string; + type: string; + url: string; + }; + type GitListMatchingRefsResponseItem = { + node_id: string; + object: GitListMatchingRefsResponseItemObject; + ref: string; + url: string; + }; + type GitGetTreeResponseTreeItem = { + mode: string; + path: string; + sha: string; + size?: number; + type: string; + url: string; + }; + type GitGetTreeResponse = { + sha: string; + tree: Array; + truncated: boolean; + url: string; + }; + type GitGetTagResponseVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type GitGetTagResponseTagger = { date: string; email: string; name: string }; + type GitGetTagResponseObject = { sha: string; type: string; url: string }; + type GitGetTagResponse = { + message: string; + node_id: string; + object: GitGetTagResponseObject; + sha: string; + tag: string; + tagger: GitGetTagResponseTagger; + url: string; + verification: GitGetTagResponseVerification; + }; + type GitGetRefResponseObject = { sha: string; type: string; url: string }; + type GitGetRefResponse = { + node_id: string; + object: GitGetRefResponseObject; + ref: string; + url: string; + }; + type GitGetCommitResponseVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type GitGetCommitResponseTree = { sha: string; url: string }; + type GitGetCommitResponseParentsItem = { sha: string; url: string }; + type GitGetCommitResponseCommitter = { + date: string; + email: string; + name: string; + }; + type GitGetCommitResponseAuthor = { + date: string; + email: string; + name: string; + }; + type GitGetCommitResponse = { + author: GitGetCommitResponseAuthor; + committer: GitGetCommitResponseCommitter; + message: string; + parents: Array; + sha: string; + tree: GitGetCommitResponseTree; + url: string; + verification: GitGetCommitResponseVerification; + }; + type GitGetBlobResponse = { + content: string; + encoding: string; + sha: string; + size: number; + url: string; + }; + type GitCreateTreeResponseTreeItem = { + mode: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type GitCreateTreeResponse = { + sha: string; + tree: Array; + url: string; + }; + type GitCreateTagResponseVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type GitCreateTagResponseTagger = { + date: string; + email: string; + name: string; + }; + type GitCreateTagResponseObject = { sha: string; type: string; url: string }; + type GitCreateTagResponse = { + message: string; + node_id: string; + object: GitCreateTagResponseObject; + sha: string; + tag: string; + tagger: GitCreateTagResponseTagger; + url: string; + verification: GitCreateTagResponseVerification; + }; + type GitCreateRefResponseObject = { sha: string; type: string; url: string }; + type GitCreateRefResponse = { + node_id: string; + object: GitCreateRefResponseObject; + ref: string; + url: string; + }; + type GitCreateCommitResponseVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type GitCreateCommitResponseTree = { sha: string; url: string }; + type GitCreateCommitResponseParentsItem = { sha: string; url: string }; + type GitCreateCommitResponseCommitter = { + date: string; + email: string; + name: string; + }; + type GitCreateCommitResponseAuthor = { + date: string; + email: string; + name: string; + }; + type GitCreateCommitResponse = { + author: GitCreateCommitResponseAuthor; + committer: GitCreateCommitResponseCommitter; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: GitCreateCommitResponseTree; + url: string; + verification: GitCreateCommitResponseVerification; + }; + type GitCreateBlobResponse = { sha: string; url: string }; + type GistsUpdateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsUpdateCommentResponse = { + body: string; + created_at: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: GistsUpdateCommentResponseUser; + }; + type GistsUpdateResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsUpdateResponseHistoryItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsUpdateResponseHistoryItemChangeStatus = { + additions: number; + deletions: number; + total: number; + }; + type GistsUpdateResponseHistoryItem = { + change_status: GistsUpdateResponseHistoryItemChangeStatus; + committed_at: string; + url: string; + user: GistsUpdateResponseHistoryItemUser; + version: string; + }; + type GistsUpdateResponseForksItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsUpdateResponseForksItem = { + created_at: string; + id: string; + updated_at: string; + url: string; + user: GistsUpdateResponseForksItemUser; + }; + type GistsUpdateResponseFilesNewFileTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsUpdateResponseFilesHelloWorldRb = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsUpdateResponseFilesHelloWorldPy = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsUpdateResponseFilesHelloWorldMd = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsUpdateResponseFiles = { + "hello_world.md": GistsUpdateResponseFilesHelloWorldMd; + "hello_world.py": GistsUpdateResponseFilesHelloWorldPy; + "hello_world.rb": GistsUpdateResponseFilesHelloWorldRb; + "new_file.txt": GistsUpdateResponseFilesNewFileTxt; + }; + type GistsUpdateResponse = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsUpdateResponseFiles; + forks: Array; + forks_url: string; + git_pull_url: string; + git_push_url: string; + history: Array; + html_url: string; + id: string; + node_id: string; + owner: GistsUpdateResponseOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsListStarredResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListStarredResponseItemFilesHelloWorldRb = { + filename: string; + language: string; + raw_url: string; + size: number; + type: string; + }; + type GistsListStarredResponseItemFiles = { + "hello_world.rb": GistsListStarredResponseItemFilesHelloWorldRb; + }; + type GistsListStarredResponseItem = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsListStarredResponseItemFiles; + forks_url: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + id: string; + node_id: string; + owner: GistsListStarredResponseItemOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsListPublicForUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListPublicForUserResponseItemFilesHelloWorldRb = { + filename: string; + language: string; + raw_url: string; + size: number; + type: string; + }; + type GistsListPublicForUserResponseItemFiles = { + "hello_world.rb": GistsListPublicForUserResponseItemFilesHelloWorldRb; + }; + type GistsListPublicForUserResponseItem = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsListPublicForUserResponseItemFiles; + forks_url: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + id: string; + node_id: string; + owner: GistsListPublicForUserResponseItemOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsListPublicResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListPublicResponseItemFilesHelloWorldRb = { + filename: string; + language: string; + raw_url: string; + size: number; + type: string; + }; + type GistsListPublicResponseItemFiles = { + "hello_world.rb": GistsListPublicResponseItemFilesHelloWorldRb; + }; + type GistsListPublicResponseItem = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsListPublicResponseItemFiles; + forks_url: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + id: string; + node_id: string; + owner: GistsListPublicResponseItemOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsListForksResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListForksResponseItem = { + created_at: string; + id: string; + updated_at: string; + url: string; + user: GistsListForksResponseItemUser; + }; + type GistsListCommitsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListCommitsResponseItemChangeStatus = { + additions: number; + deletions: number; + total: number; + }; + type GistsListCommitsResponseItem = { + change_status: GistsListCommitsResponseItemChangeStatus; + committed_at: string; + url: string; + user: GistsListCommitsResponseItemUser; + version: string; + }; + type GistsListCommentsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListCommentsResponseItem = { + body: string; + created_at: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: GistsListCommentsResponseItemUser; + }; + type GistsListResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListResponseItemFilesHelloWorldRb = { + filename: string; + language: string; + raw_url: string; + size: number; + type: string; + }; + type GistsListResponseItemFiles = { + "hello_world.rb": GistsListResponseItemFilesHelloWorldRb; + }; + type GistsListResponseItem = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsListResponseItemFiles; + forks_url: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + id: string; + node_id: string; + owner: GistsListResponseItemOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsGetRevisionResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetRevisionResponseHistoryItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetRevisionResponseHistoryItemChangeStatus = { + additions: number; + deletions: number; + total: number; + }; + type GistsGetRevisionResponseHistoryItem = { + change_status: GistsGetRevisionResponseHistoryItemChangeStatus; + committed_at: string; + url: string; + user: GistsGetRevisionResponseHistoryItemUser; + version: string; + }; + type GistsGetRevisionResponseForksItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetRevisionResponseForksItem = { + created_at: string; + id: string; + updated_at: string; + url: string; + user: GistsGetRevisionResponseForksItemUser; + }; + type GistsGetRevisionResponseFilesHelloWorldRubyTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetRevisionResponseFilesHelloWorldPythonTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetRevisionResponseFilesHelloWorldRb = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetRevisionResponseFilesHelloWorldPy = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetRevisionResponseFiles = { + "hello_world.py": GistsGetRevisionResponseFilesHelloWorldPy; + "hello_world.rb": GistsGetRevisionResponseFilesHelloWorldRb; + "hello_world_python.txt": GistsGetRevisionResponseFilesHelloWorldPythonTxt; + "hello_world_ruby.txt": GistsGetRevisionResponseFilesHelloWorldRubyTxt; + }; + type GistsGetRevisionResponse = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsGetRevisionResponseFiles; + forks: Array; + forks_url: string; + git_pull_url: string; + git_push_url: string; + history: Array; + html_url: string; + id: string; + node_id: string; + owner: GistsGetRevisionResponseOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsGetCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetCommentResponse = { + body: string; + created_at: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: GistsGetCommentResponseUser; + }; + type GistsGetResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetResponseHistoryItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetResponseHistoryItemChangeStatus = { + additions: number; + deletions: number; + total: number; + }; + type GistsGetResponseHistoryItem = { + change_status: GistsGetResponseHistoryItemChangeStatus; + committed_at: string; + url: string; + user: GistsGetResponseHistoryItemUser; + version: string; + }; + type GistsGetResponseForksItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetResponseForksItem = { + created_at: string; + id: string; + updated_at: string; + url: string; + user: GistsGetResponseForksItemUser; + }; + type GistsGetResponseFilesHelloWorldRubyTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetResponseFilesHelloWorldPythonTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetResponseFilesHelloWorldRb = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetResponseFilesHelloWorldPy = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetResponseFiles = { + "hello_world.py": GistsGetResponseFilesHelloWorldPy; + "hello_world.rb": GistsGetResponseFilesHelloWorldRb; + "hello_world_python.txt": GistsGetResponseFilesHelloWorldPythonTxt; + "hello_world_ruby.txt": GistsGetResponseFilesHelloWorldRubyTxt; + }; + type GistsGetResponse = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsGetResponseFiles; + forks: Array; + forks_url: string; + git_pull_url: string; + git_push_url: string; + history: Array; + html_url: string; + id: string; + node_id: string; + owner: GistsGetResponseOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsForkResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsForkResponseFilesHelloWorldRb = { + filename: string; + language: string; + raw_url: string; + size: number; + type: string; + }; + type GistsForkResponseFiles = { + "hello_world.rb": GistsForkResponseFilesHelloWorldRb; + }; + type GistsForkResponse = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsForkResponseFiles; + forks_url: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + id: string; + node_id: string; + owner: GistsForkResponseOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsCreateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsCreateCommentResponse = { + body: string; + created_at: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: GistsCreateCommentResponseUser; + }; + type GistsCreateResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsCreateResponseHistoryItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsCreateResponseHistoryItemChangeStatus = { + additions: number; + deletions: number; + total: number; + }; + type GistsCreateResponseHistoryItem = { + change_status: GistsCreateResponseHistoryItemChangeStatus; + committed_at: string; + url: string; + user: GistsCreateResponseHistoryItemUser; + version: string; + }; + type GistsCreateResponseForksItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsCreateResponseForksItem = { + created_at: string; + id: string; + updated_at: string; + url: string; + user: GistsCreateResponseForksItemUser; + }; + type GistsCreateResponseFilesHelloWorldRubyTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsCreateResponseFilesHelloWorldPythonTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsCreateResponseFilesHelloWorldRb = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsCreateResponseFilesHelloWorldPy = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsCreateResponseFiles = { + "hello_world.py": GistsCreateResponseFilesHelloWorldPy; + "hello_world.rb": GistsCreateResponseFilesHelloWorldRb; + "hello_world_python.txt": GistsCreateResponseFilesHelloWorldPythonTxt; + "hello_world_ruby.txt": GistsCreateResponseFilesHelloWorldRubyTxt; + }; + type GistsCreateResponse = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsCreateResponseFiles; + forks: Array; + forks_url: string; + git_pull_url: string; + git_push_url: string; + history: Array; + html_url: string; + id: string; + node_id: string; + owner: GistsCreateResponseOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type CodesOfConductListConductCodesResponseItem = { + key: string; + name: string; + url: string; + }; + type CodesOfConductGetForRepoResponse = { + body: string; + key: string; + name: string; + url: string; + }; + type CodesOfConductGetConductCodeResponse = { + body: string; + key: string; + name: string; + url: string; + }; + type ChecksUpdateResponsePullRequestsItemHeadRepo = { + id: number; + name: string; + url: string; + }; + type ChecksUpdateResponsePullRequestsItemHead = { + ref: string; + repo: ChecksUpdateResponsePullRequestsItemHeadRepo; + sha: string; + }; + type ChecksUpdateResponsePullRequestsItemBaseRepo = { + id: number; + name: string; + url: string; + }; + type ChecksUpdateResponsePullRequestsItemBase = { + ref: string; + repo: ChecksUpdateResponsePullRequestsItemBaseRepo; + sha: string; + }; + type ChecksUpdateResponsePullRequestsItem = { + base: ChecksUpdateResponsePullRequestsItemBase; + head: ChecksUpdateResponsePullRequestsItemHead; + id: number; + number: number; + url: string; + }; + type ChecksUpdateResponseOutput = { + annotations_count: number; + annotations_url: string; + summary: string; + text: string; + title: string; + }; + type ChecksUpdateResponseCheckSuite = { id: number }; + type ChecksUpdateResponseAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksUpdateResponseAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksUpdateResponseApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksUpdateResponseAppOwner; + permissions: ChecksUpdateResponseAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksUpdateResponse = { + app: ChecksUpdateResponseApp; + check_suite: ChecksUpdateResponseCheckSuite; + completed_at: string; + conclusion: string; + details_url: string; + external_id: string; + head_sha: string; + html_url: string; + id: number; + name: string; + node_id: string; + output: ChecksUpdateResponseOutput; + pull_requests: Array; + started_at: string; + status: string; + url: string; + }; + type ChecksSetSuitesPreferencesResponseRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ChecksSetSuitesPreferencesResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ChecksSetSuitesPreferencesResponseRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ChecksSetSuitesPreferencesResponseRepositoryOwner; + permissions: ChecksSetSuitesPreferencesResponseRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ChecksSetSuitesPreferencesResponsePreferencesAutoTriggerChecksItem = { + app_id: number; + setting: boolean; + }; + type ChecksSetSuitesPreferencesResponsePreferences = { + auto_trigger_checks: Array< + ChecksSetSuitesPreferencesResponsePreferencesAutoTriggerChecksItem + >; + }; + type ChecksSetSuitesPreferencesResponse = { + preferences: ChecksSetSuitesPreferencesResponsePreferences; + repository: ChecksSetSuitesPreferencesResponseRepository; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ChecksListSuitesForRefResponseCheckSuitesItemRepositoryOwner; + permissions: ChecksListSuitesForRefResponseCheckSuitesItemRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksListSuitesForRefResponseCheckSuitesItemAppOwner; + permissions: ChecksListSuitesForRefResponseCheckSuitesItemAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksListSuitesForRefResponseCheckSuitesItem = { + after: string; + app: ChecksListSuitesForRefResponseCheckSuitesItemApp; + before: string; + conclusion: string; + head_branch: string; + head_sha: string; + id: number; + node_id: string; + pull_requests: Array; + repository: ChecksListSuitesForRefResponseCheckSuitesItemRepository; + status: string; + url: string; + }; + type ChecksListSuitesForRefResponse = { + check_suites: Array; + total_count: number; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHeadRepo = { + id: number; + name: string; + url: string; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHead = { + ref: string; + repo: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHeadRepo; + sha: string; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBaseRepo = { + id: number; + name: string; + url: string; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBase = { + ref: string; + repo: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBaseRepo; + sha: string; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItem = { + base: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBase; + head: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHead; + id: number; + number: number; + url: string; + }; + type ChecksListForSuiteResponseCheckRunsItemOutput = { + annotations_count: number; + annotations_url: string; + summary: string; + text: string; + title: string; + }; + type ChecksListForSuiteResponseCheckRunsItemCheckSuite = { id: number }; + type ChecksListForSuiteResponseCheckRunsItemAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksListForSuiteResponseCheckRunsItemAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksListForSuiteResponseCheckRunsItemApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksListForSuiteResponseCheckRunsItemAppOwner; + permissions: ChecksListForSuiteResponseCheckRunsItemAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksListForSuiteResponseCheckRunsItem = { + app: ChecksListForSuiteResponseCheckRunsItemApp; + check_suite: ChecksListForSuiteResponseCheckRunsItemCheckSuite; + completed_at: string; + conclusion: string; + details_url: string; + external_id: string; + head_sha: string; + html_url: string; + id: number; + name: string; + node_id: string; + output: ChecksListForSuiteResponseCheckRunsItemOutput; + pull_requests: Array< + ChecksListForSuiteResponseCheckRunsItemPullRequestsItem + >; + started_at: string; + status: string; + url: string; + }; + type ChecksListForSuiteResponse = { + check_runs: Array; + total_count: number; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemHeadRepo = { + id: number; + name: string; + url: string; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemHead = { + ref: string; + repo: ChecksListForRefResponseCheckRunsItemPullRequestsItemHeadRepo; + sha: string; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemBaseRepo = { + id: number; + name: string; + url: string; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemBase = { + ref: string; + repo: ChecksListForRefResponseCheckRunsItemPullRequestsItemBaseRepo; + sha: string; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItem = { + base: ChecksListForRefResponseCheckRunsItemPullRequestsItemBase; + head: ChecksListForRefResponseCheckRunsItemPullRequestsItemHead; + id: number; + number: number; + url: string; + }; + type ChecksListForRefResponseCheckRunsItemOutput = { + annotations_count: number; + annotations_url: string; + summary: string; + text: string; + title: string; + }; + type ChecksListForRefResponseCheckRunsItemCheckSuite = { id: number }; + type ChecksListForRefResponseCheckRunsItemAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksListForRefResponseCheckRunsItemAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksListForRefResponseCheckRunsItemApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksListForRefResponseCheckRunsItemAppOwner; + permissions: ChecksListForRefResponseCheckRunsItemAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksListForRefResponseCheckRunsItem = { + app: ChecksListForRefResponseCheckRunsItemApp; + check_suite: ChecksListForRefResponseCheckRunsItemCheckSuite; + completed_at: string; + conclusion: string; + details_url: string; + external_id: string; + head_sha: string; + html_url: string; + id: number; + name: string; + node_id: string; + output: ChecksListForRefResponseCheckRunsItemOutput; + pull_requests: Array; + started_at: string; + status: string; + url: string; + }; + type ChecksListForRefResponse = { + check_runs: Array; + total_count: number; + }; + type ChecksListAnnotationsResponseItem = { + annotation_level: string; + end_column: number; + end_line: number; + message: string; + path: string; + raw_details: string; + start_column: number; + start_line: number; + title: string; + }; + type ChecksGetSuiteResponseRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ChecksGetSuiteResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ChecksGetSuiteResponseRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ChecksGetSuiteResponseRepositoryOwner; + permissions: ChecksGetSuiteResponseRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ChecksGetSuiteResponseAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksGetSuiteResponseAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksGetSuiteResponseApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksGetSuiteResponseAppOwner; + permissions: ChecksGetSuiteResponseAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksGetSuiteResponse = { + after: string; + app: ChecksGetSuiteResponseApp; + before: string; + conclusion: string; + head_branch: string; + head_sha: string; + id: number; + node_id: string; + pull_requests: Array; + repository: ChecksGetSuiteResponseRepository; + status: string; + url: string; + }; + type ChecksGetResponsePullRequestsItemHeadRepo = { + id: number; + name: string; + url: string; + }; + type ChecksGetResponsePullRequestsItemHead = { + ref: string; + repo: ChecksGetResponsePullRequestsItemHeadRepo; + sha: string; + }; + type ChecksGetResponsePullRequestsItemBaseRepo = { + id: number; + name: string; + url: string; + }; + type ChecksGetResponsePullRequestsItemBase = { + ref: string; + repo: ChecksGetResponsePullRequestsItemBaseRepo; + sha: string; + }; + type ChecksGetResponsePullRequestsItem = { + base: ChecksGetResponsePullRequestsItemBase; + head: ChecksGetResponsePullRequestsItemHead; + id: number; + number: number; + url: string; + }; + type ChecksGetResponseOutput = { + annotations_count: number; + annotations_url: string; + summary: string; + text: string; + title: string; + }; + type ChecksGetResponseCheckSuite = { id: number }; + type ChecksGetResponseAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksGetResponseAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksGetResponseApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksGetResponseAppOwner; + permissions: ChecksGetResponseAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksGetResponse = { + app: ChecksGetResponseApp; + check_suite: ChecksGetResponseCheckSuite; + completed_at: string; + conclusion: string; + details_url: string; + external_id: string; + head_sha: string; + html_url: string; + id: number; + name: string; + node_id: string; + output: ChecksGetResponseOutput; + pull_requests: Array; + started_at: string; + status: string; + url: string; + }; + type ChecksCreateSuiteResponseRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ChecksCreateSuiteResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ChecksCreateSuiteResponseRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ChecksCreateSuiteResponseRepositoryOwner; + permissions: ChecksCreateSuiteResponseRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ChecksCreateSuiteResponseAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksCreateSuiteResponseAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksCreateSuiteResponseApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksCreateSuiteResponseAppOwner; + permissions: ChecksCreateSuiteResponseAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksCreateSuiteResponse = { + after: string; + app: ChecksCreateSuiteResponseApp; + before: string; + conclusion: string; + head_branch: string; + head_sha: string; + id: number; + node_id: string; + pull_requests: Array; + repository: ChecksCreateSuiteResponseRepository; + status: string; + url: string; + }; + type ChecksCreateResponsePullRequestsItemHeadRepo = { + id: number; + name: string; + url: string; + }; + type ChecksCreateResponsePullRequestsItemHead = { + ref: string; + repo: ChecksCreateResponsePullRequestsItemHeadRepo; + sha: string; + }; + type ChecksCreateResponsePullRequestsItemBaseRepo = { + id: number; + name: string; + url: string; + }; + type ChecksCreateResponsePullRequestsItemBase = { + ref: string; + repo: ChecksCreateResponsePullRequestsItemBaseRepo; + sha: string; + }; + type ChecksCreateResponsePullRequestsItem = { + base: ChecksCreateResponsePullRequestsItemBase; + head: ChecksCreateResponsePullRequestsItemHead; + id: number; + number: number; + url: string; + }; + type ChecksCreateResponseOutput = { + summary: string; + text: string; + title: string; + annotations_count?: number; + annotations_url?: string; + }; + type ChecksCreateResponseCheckSuite = { id: number }; + type ChecksCreateResponseAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksCreateResponseAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksCreateResponseApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksCreateResponseAppOwner; + permissions: ChecksCreateResponseAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksCreateResponse = { + app: ChecksCreateResponseApp; + check_suite: ChecksCreateResponseCheckSuite; + completed_at: null | string; + conclusion: null | string; + details_url: string; + external_id: string; + head_sha: string; + html_url: string; + id: number; + name: string; + node_id: string; + output: ChecksCreateResponseOutput; + pull_requests: Array; + started_at: string; + status: string; + url: string; + }; + type AppsResetTokenResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsResetTokenResponseApp = { + client_id: string; + name: string; + url: string; + }; + type AppsResetTokenResponse = { + app: AppsResetTokenResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: AppsResetTokenResponseUser; + }; + type AppsResetAuthorizationResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsResetAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type AppsResetAuthorizationResponse = { + app: AppsResetAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: AppsResetAuthorizationResponseUser; + }; + type AppsListReposResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsListReposResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: AppsListReposResponseRepositoriesItemOwner; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type AppsListReposResponse = { + repositories: Array; + total_count: number; + }; + type AppsListPlansStubbedResponseItem = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListPlansResponseItem = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemPlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemAccount = { + email: null; + id: number; + login: string; + organization_billing_email: string; + type: string; + url: string; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItem = { + account: AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemAccount; + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemPlan; + unit_count: null; + updated_at: string; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserResponseItemPlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserResponseItemAccount = { + email: null; + id: number; + login: string; + organization_billing_email: string; + type: string; + url: string; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserResponseItem = { + account: AppsListMarketplacePurchasesForAuthenticatedUserResponseItemAccount; + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsListMarketplacePurchasesForAuthenticatedUserResponseItemPlan; + unit_count: null; + updated_at: string; + }; + type AppsListInstallationsForAuthenticatedUserResponseInstallationsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type AppsListInstallationsForAuthenticatedUserResponseInstallationsItemAccount = { + avatar_url: string; + description?: string; + events_url: string; + hooks_url?: string; + id: number; + issues_url?: string; + login: string; + members_url?: string; + node_id: string; + public_members_url?: string; + repos_url: string; + url: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + organizations_url?: string; + received_events_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + }; + type AppsListInstallationsForAuthenticatedUserResponseInstallationsItem = { + access_tokens_url: string; + account: AppsListInstallationsForAuthenticatedUserResponseInstallationsItemAccount; + app_id: number; + events: Array; + html_url: string; + id: number; + permissions: AppsListInstallationsForAuthenticatedUserResponseInstallationsItemPermissions; + repositories_url: string; + single_file_name: string; + target_id: number; + target_type: string; + }; + type AppsListInstallationsForAuthenticatedUserResponse = { + installations: Array< + AppsListInstallationsForAuthenticatedUserResponseInstallationsItem + >; + total_count: number; + }; + type AppsListInstallationsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type AppsListInstallationsResponseItemAccount = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type AppsListInstallationsResponseItem = { + access_tokens_url: string; + account: AppsListInstallationsResponseItemAccount; + app_id: number; + events: Array; + html_url: string; + id: number; + permissions: AppsListInstallationsResponseItemPermissions; + repositories_url: string; + repository_selection: string; + single_file_name: string; + target_id: number; + target_type: string; + }; + type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemOwner; + permissions: AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type AppsListInstallationReposForAuthenticatedUserResponse = { + repositories: Array< + AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItem + >; + total_count: number; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchasePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchase = { + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchasePlan; + unit_count: null; + updated_at: string; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChangePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChange = { + effective_date: string; + id: number; + plan: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChangePlan; + unit_count: null; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItem = { + email: null; + id: number; + login: string; + marketplace_pending_change: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChange; + marketplace_purchase: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchase; + organization_billing_email: string; + type: string; + url: string; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchasePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchase = { + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchasePlan; + unit_count: null; + updated_at: string; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChangePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChange = { + effective_date: string; + id: number; + plan: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChangePlan; + unit_count: null; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItem = { + email: null; + id: number; + login: string; + marketplace_pending_change: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChange; + marketplace_purchase: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchase; + organization_billing_email: string; + type: string; + url: string; + }; + type AppsGetUserInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsGetUserInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsGetUserInstallationResponse = { + access_tokens_url: string; + account: AppsGetUserInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsGetUserInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsGetRepoInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsGetRepoInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsGetRepoInstallationResponse = { + access_tokens_url: string; + account: AppsGetRepoInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsGetRepoInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsGetOrgInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsGetOrgInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsGetOrgInstallationResponse = { + access_tokens_url: string; + account: AppsGetOrgInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsGetOrgInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsGetInstallationResponsePermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type AppsGetInstallationResponseAccount = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type AppsGetInstallationResponse = { + access_tokens_url: string; + account: AppsGetInstallationResponseAccount; + app_id: number; + events: Array; + html_url: string; + id: number; + permissions: AppsGetInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: string; + target_id: number; + target_type: string; + }; + type AppsGetBySlugResponsePermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type AppsGetBySlugResponseOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type AppsGetBySlugResponse = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: AppsGetBySlugResponseOwner; + permissions: AppsGetBySlugResponsePermissions; + slug: string; + updated_at: string; + }; + type AppsGetAuthenticatedResponsePermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type AppsGetAuthenticatedResponseOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type AppsGetAuthenticatedResponse = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + installations_count: number; + name: string; + node_id: string; + owner: AppsGetAuthenticatedResponseOwner; + permissions: AppsGetAuthenticatedResponsePermissions; + slug: string; + updated_at: string; + }; + type AppsFindUserInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsFindUserInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsFindUserInstallationResponse = { + access_tokens_url: string; + account: AppsFindUserInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsFindUserInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsFindRepoInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsFindRepoInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsFindRepoInstallationResponse = { + access_tokens_url: string; + account: AppsFindRepoInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsFindRepoInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsFindOrgInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsFindOrgInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsFindOrgInstallationResponse = { + access_tokens_url: string; + account: AppsFindOrgInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsFindOrgInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsCreateInstallationTokenResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type AppsCreateInstallationTokenResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsCreateInstallationTokenResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: AppsCreateInstallationTokenResponseRepositoriesItemOwner; + permissions: AppsCreateInstallationTokenResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type AppsCreateInstallationTokenResponsePermissions = { + contents: string; + issues: string; + }; + type AppsCreateInstallationTokenResponse = { + expires_at: string; + permissions: AppsCreateInstallationTokenResponsePermissions; + repositories: Array; + token: string; + }; + type AppsCreateFromManifestResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsCreateFromManifestResponse = { + client_id: string; + client_secret: string; + created_at: string; + description: null; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: AppsCreateFromManifestResponseOwner; + pem: string; + updated_at: string; + webhook_secret: string; + }; + type AppsCreateContentAttachmentResponse = { + body: string; + id: number; + title: string; + }; + type AppsCheckTokenResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsCheckTokenResponseApp = { + client_id: string; + name: string; + url: string; + }; + type AppsCheckTokenResponse = { + app: AppsCheckTokenResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: AppsCheckTokenResponseUser; + }; + type AppsCheckAuthorizationResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsCheckAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type AppsCheckAuthorizationResponse = { + app: AppsCheckAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: AppsCheckAuthorizationResponseUser; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchasePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchase = { + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchasePlan; + unit_count: null; + updated_at: string; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChangePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChange = { + effective_date: string; + id: number; + plan: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChangePlan; + unit_count: null; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponse = { + email: null; + id: number; + login: string; + marketplace_pending_change: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChange; + marketplace_purchase: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchase; + organization_billing_email: string; + type: string; + url: string; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchasePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchase = { + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchasePlan; + unit_count: null; + updated_at: string; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChangePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChange = { + effective_date: string; + id: number; + plan: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChangePlan; + unit_count: null; + }; + type AppsCheckAccountIsAssociatedWithAnyResponse = { + email: null; + id: number; + login: string; + marketplace_pending_change: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChange; + marketplace_purchase: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchase; + organization_billing_email: string; + type: string; + url: string; + }; + type ActivitySetThreadSubscriptionResponse = { + created_at: string; + ignored: boolean; + reason: null; + subscribed: boolean; + thread_url: string; + url: string; + }; + type ActivitySetRepoSubscriptionResponse = { + created_at: string; + ignored: boolean; + reason: null; + repository_url: string; + subscribed: boolean; + url: string; + }; + type ActivityListWatchersForRepoResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ActivityListWatchedReposForAuthenticatedUserResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ActivityListWatchedReposForAuthenticatedUserResponseItemOwner; + permissions: ActivityListWatchedReposForAuthenticatedUserResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ActivityListStargazersForRepoResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListReposWatchedByUserResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ActivityListReposWatchedByUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListReposWatchedByUserResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type ActivityListReposWatchedByUserResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ActivityListReposWatchedByUserResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ActivityListReposWatchedByUserResponseItemOwner; + permissions: ActivityListReposWatchedByUserResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ActivityListReposStarredByUserResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ActivityListReposStarredByUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListReposStarredByUserResponseItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ActivityListReposStarredByUserResponseItemOwner; + permissions: ActivityListReposStarredByUserResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ActivityListReposStarredByAuthenticatedUserResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ActivityListReposStarredByAuthenticatedUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListReposStarredByAuthenticatedUserResponseItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ActivityListReposStarredByAuthenticatedUserResponseItemOwner; + permissions: ActivityListReposStarredByAuthenticatedUserResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; + }; + type ActivityListNotificationsForRepoResponseItemSubject = { + latest_comment_url: string; + title: string; + type: string; + url: string; + }; + type ActivityListNotificationsForRepoResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListNotificationsForRepoResponseItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ActivityListNotificationsForRepoResponseItemRepositoryOwner; + private: boolean; + 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; + url: string; + }; + type ActivityListNotificationsForRepoResponseItem = { + id: string; + last_read_at: string; + reason: string; + repository: ActivityListNotificationsForRepoResponseItemRepository; + subject: ActivityListNotificationsForRepoResponseItemSubject; + unread: boolean; + updated_at: string; + url: string; + }; + type ActivityListNotificationsResponseItemSubject = { + latest_comment_url: string; + title: string; + type: string; + url: string; + }; + type ActivityListNotificationsResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListNotificationsResponseItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ActivityListNotificationsResponseItemRepositoryOwner; + private: boolean; + 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; + url: string; + }; + type ActivityListNotificationsResponseItem = { + id: string; + last_read_at: string; + reason: string; + repository: ActivityListNotificationsResponseItemRepository; + subject: ActivityListNotificationsResponseItemSubject; + unread: boolean; + updated_at: string; + url: string; + }; + type ActivityListFeedsResponseLinksUser = { href: string; type: string }; + type ActivityListFeedsResponseLinksTimeline = { href: string; type: string }; + type ActivityListFeedsResponseLinksSecurityAdvisories = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserPublic = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserOrganizationsItem = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserOrganization = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserActor = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUser = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinks = { + current_user: ActivityListFeedsResponseLinksCurrentUser; + current_user_actor: ActivityListFeedsResponseLinksCurrentUserActor; + current_user_organization: ActivityListFeedsResponseLinksCurrentUserOrganization; + current_user_organizations: Array< + ActivityListFeedsResponseLinksCurrentUserOrganizationsItem + >; + current_user_public: ActivityListFeedsResponseLinksCurrentUserPublic; + security_advisories: ActivityListFeedsResponseLinksSecurityAdvisories; + timeline: ActivityListFeedsResponseLinksTimeline; + user: ActivityListFeedsResponseLinksUser; + }; + type ActivityListFeedsResponse = { + _links: ActivityListFeedsResponseLinks; + current_user_actor_url: string; + current_user_organization_url: string; + current_user_organization_urls: Array; + current_user_public_url: string; + current_user_url: string; + security_advisories_url: string; + timeline_url: string; + user_url: string; + }; + type ActivityGetThreadSubscriptionResponse = { + created_at: string; + ignored: boolean; + reason: null; + subscribed: boolean; + thread_url: string; + url: string; + }; + type ActivityGetThreadResponseSubject = { + latest_comment_url: string; + title: string; + type: string; + url: string; + }; + type ActivityGetThreadResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityGetThreadResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ActivityGetThreadResponseRepositoryOwner; + private: boolean; + 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; + url: string; + }; + type ActivityGetThreadResponse = { + id: string; + last_read_at: string; + reason: string; + repository: ActivityGetThreadResponseRepository; + subject: ActivityGetThreadResponseSubject; + unread: boolean; + updated_at: string; + url: string; + }; + type ActivityGetRepoSubscriptionResponse = { + created_at: string; + ignored: boolean; + reason: null; + repository_url: string; + subscribed: boolean; + url: string; + }; + type ActivityListNotificationsResponse = Array< + ActivityListNotificationsResponseItem + >; + type ActivityListNotificationsForRepoResponse = Array< + ActivityListNotificationsForRepoResponseItem + >; + type ActivityListReposStarredByAuthenticatedUserResponse = Array< + ActivityListReposStarredByAuthenticatedUserResponseItem + >; + type ActivityListReposStarredByUserResponse = Array< + ActivityListReposStarredByUserResponseItem + >; + type ActivityListReposWatchedByUserResponse = Array< + ActivityListReposWatchedByUserResponseItem + >; + type ActivityListStargazersForRepoResponse = Array< + ActivityListStargazersForRepoResponseItem + >; + type ActivityListWatchedReposForAuthenticatedUserResponse = Array< + ActivityListWatchedReposForAuthenticatedUserResponseItem + >; + type ActivityListWatchersForRepoResponse = Array< + ActivityListWatchersForRepoResponseItem + >; + type AppsListAccountsUserOrOrgOnPlanResponse = Array< + AppsListAccountsUserOrOrgOnPlanResponseItem + >; + type AppsListAccountsUserOrOrgOnPlanStubbedResponse = Array< + AppsListAccountsUserOrOrgOnPlanStubbedResponseItem + >; + type AppsListInstallationsResponse = Array; + type AppsListMarketplacePurchasesForAuthenticatedUserResponse = Array< + AppsListMarketplacePurchasesForAuthenticatedUserResponseItem + >; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponse = Array< + AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItem + >; + type AppsListPlansResponse = Array; + type AppsListPlansStubbedResponse = Array; + type ChecksListAnnotationsResponse = Array; + type CodesOfConductListConductCodesResponse = Array< + CodesOfConductListConductCodesResponseItem + >; + type GistsListResponse = Array; + type GistsListCommentsResponse = Array; + type GistsListCommitsResponse = Array; + type GistsListForksResponse = Array; + type GistsListPublicResponse = Array; + type GistsListPublicForUserResponse = Array< + GistsListPublicForUserResponseItem + >; + type GistsListStarredResponse = Array; + type GitListMatchingRefsResponse = Array; + type GitignoreListTemplatesResponse = Array; + type IssuesAddLabelsResponse = Array; + type IssuesListResponse = Array; + type IssuesListAssigneesResponse = Array; + type IssuesListCommentsResponse = Array; + type IssuesListCommentsForRepoResponse = Array< + IssuesListCommentsForRepoResponseItem + >; + type IssuesListEventsResponse = Array; + type IssuesListEventsForRepoResponse = Array< + IssuesListEventsForRepoResponseItem + >; + type IssuesListEventsForTimelineResponse = Array< + IssuesListEventsForTimelineResponseItem + >; + type IssuesListForAuthenticatedUserResponse = Array< + IssuesListForAuthenticatedUserResponseItem + >; + type IssuesListForOrgResponse = Array; + type IssuesListForRepoResponse = Array; + type IssuesListLabelsForMilestoneResponse = Array< + IssuesListLabelsForMilestoneResponseItem + >; + type IssuesListLabelsForRepoResponse = Array< + IssuesListLabelsForRepoResponseItem + >; + type IssuesListLabelsOnIssueResponse = Array< + IssuesListLabelsOnIssueResponseItem + >; + type IssuesListMilestonesForRepoResponse = Array< + IssuesListMilestonesForRepoResponseItem + >; + type IssuesRemoveLabelResponse = Array; + type IssuesReplaceLabelsResponse = Array; + type LicensesListResponse = Array; + type LicensesListCommonlyUsedResponse = Array< + LicensesListCommonlyUsedResponseItem + >; + type MigrationsGetCommitAuthorsResponse = Array< + MigrationsGetCommitAuthorsResponseItem + >; + type MigrationsGetLargeFilesResponse = Array< + MigrationsGetLargeFilesResponseItem + >; + type MigrationsListForAuthenticatedUserResponse = Array< + MigrationsListForAuthenticatedUserResponseItem + >; + type MigrationsListForOrgResponse = Array; + type MigrationsListReposForOrgResponse = Array< + MigrationsListReposForOrgResponseItem + >; + type MigrationsListReposForUserResponse = Array< + MigrationsListReposForUserResponseItem + >; + type OauthAuthorizationsListAuthorizationsResponse = Array< + OauthAuthorizationsListAuthorizationsResponseItem + >; + type OauthAuthorizationsListGrantsResponse = Array< + OauthAuthorizationsListGrantsResponseItem + >; + type OrgsListResponse = Array; + type OrgsListBlockedUsersResponse = Array; + type OrgsListForAuthenticatedUserResponse = Array< + OrgsListForAuthenticatedUserResponseItem + >; + type OrgsListForUserResponse = Array; + type OrgsListHooksResponse = Array; + type OrgsListInvitationTeamsResponse = Array< + OrgsListInvitationTeamsResponseItem + >; + type OrgsListMembersResponse = Array; + type OrgsListMembershipsResponse = Array; + type OrgsListOutsideCollaboratorsResponse = Array< + OrgsListOutsideCollaboratorsResponseItem + >; + type OrgsListPendingInvitationsResponse = Array< + OrgsListPendingInvitationsResponseItem + >; + type OrgsListPublicMembersResponse = Array; + type ProjectsListCardsResponse = Array; + type ProjectsListCollaboratorsResponse = Array< + ProjectsListCollaboratorsResponseItem + >; + type ProjectsListColumnsResponse = Array; + type ProjectsListForOrgResponse = Array; + type ProjectsListForRepoResponse = Array; + type ProjectsListForUserResponse = Array; + type PullsGetCommentsForReviewResponse = Array< + PullsGetCommentsForReviewResponseItem + >; + type PullsListResponse = Array; + type PullsListCommentsResponse = Array; + type PullsListCommentsForRepoResponse = Array< + PullsListCommentsForRepoResponseItem + >; + type PullsListCommitsResponse = Array; + type PullsListFilesResponse = Array; + type PullsListReviewsResponse = Array; + type ReactionsListForCommitCommentResponse = Array< + ReactionsListForCommitCommentResponseItem + >; + type ReactionsListForIssueResponse = Array; + type ReactionsListForIssueCommentResponse = Array< + ReactionsListForIssueCommentResponseItem + >; + type ReactionsListForPullRequestReviewCommentResponse = Array< + ReactionsListForPullRequestReviewCommentResponseItem + >; + type ReactionsListForTeamDiscussionResponse = Array< + ReactionsListForTeamDiscussionResponseItem + >; + type ReactionsListForTeamDiscussionCommentResponse = Array< + ReactionsListForTeamDiscussionCommentResponseItem + >; + type ReactionsListForTeamDiscussionCommentInOrgResponse = Array< + ReactionsListForTeamDiscussionCommentInOrgResponseItem + >; + type ReactionsListForTeamDiscussionCommentLegacyResponse = Array< + ReactionsListForTeamDiscussionCommentLegacyResponseItem + >; + type ReactionsListForTeamDiscussionInOrgResponse = Array< + ReactionsListForTeamDiscussionInOrgResponseItem + >; + type ReactionsListForTeamDiscussionLegacyResponse = Array< + ReactionsListForTeamDiscussionLegacyResponseItem + >; + type ReposAddProtectedBranchAppRestrictionsResponse = Array< + ReposAddProtectedBranchAppRestrictionsResponseItem + >; + type ReposAddProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposAddProtectedBranchTeamRestrictionsResponse = Array< + ReposAddProtectedBranchTeamRestrictionsResponseItem + >; + type ReposAddProtectedBranchUserRestrictionsResponse = Array< + ReposAddProtectedBranchUserRestrictionsResponseItem + >; + type ReposGetAppsWithAccessToProtectedBranchResponse = Array< + ReposGetAppsWithAccessToProtectedBranchResponseItem + >; + type ReposGetCodeFrequencyStatsResponse = Array>; + type ReposGetCommitActivityStatsResponse = Array< + ReposGetCommitActivityStatsResponseItem + >; + type ReposGetContributorsStatsResponse = Array< + ReposGetContributorsStatsResponseItem + >; + type ReposGetPunchCardStatsResponse = Array>; + type ReposGetTeamsWithAccessToProtectedBranchResponse = Array< + ReposGetTeamsWithAccessToProtectedBranchResponseItem + >; + type ReposGetTopPathsResponse = Array; + type ReposGetTopReferrersResponse = Array; + type ReposGetUsersWithAccessToProtectedBranchResponse = Array< + ReposGetUsersWithAccessToProtectedBranchResponseItem + >; + type ReposListAppsWithAccessToProtectedBranchResponse = Array< + ReposListAppsWithAccessToProtectedBranchResponseItem + >; + type ReposListAssetsForReleaseResponse = Array< + ReposListAssetsForReleaseResponseItem + >; + type ReposListBranchesResponse = Array; + type ReposListBranchesForHeadCommitResponse = Array< + ReposListBranchesForHeadCommitResponseItem + >; + type ReposListCollaboratorsResponse = Array< + ReposListCollaboratorsResponseItem + >; + type ReposListCommentsForCommitResponse = Array< + ReposListCommentsForCommitResponseItem + >; + type ReposListCommitCommentsResponse = Array< + ReposListCommitCommentsResponseItem + >; + type ReposListCommitsResponse = Array; + type ReposListContributorsResponse = Array; + type ReposListDeployKeysResponse = Array; + type ReposListDeploymentStatusesResponse = Array< + ReposListDeploymentStatusesResponseItem + >; + type ReposListDeploymentsResponse = Array; + type ReposListDownloadsResponse = Array; + type ReposListForOrgResponse = Array; + type ReposListForksResponse = Array; + type ReposListHooksResponse = Array; + type ReposListInvitationsResponse = Array; + type ReposListInvitationsForAuthenticatedUserResponse = Array< + ReposListInvitationsForAuthenticatedUserResponseItem + >; + type ReposListPagesBuildsResponse = Array; + type ReposListProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposListProtectedBranchTeamRestrictionsResponse = Array< + ReposListProtectedBranchTeamRestrictionsResponseItem + >; + type ReposListProtectedBranchUserRestrictionsResponse = Array< + ReposListProtectedBranchUserRestrictionsResponseItem + >; + type ReposListPublicResponse = Array; + type ReposListPullRequestsAssociatedWithCommitResponse = Array< + ReposListPullRequestsAssociatedWithCommitResponseItem + >; + type ReposListReleasesResponse = Array; + type ReposListStatusesForRefResponse = Array< + ReposListStatusesForRefResponseItem + >; + type ReposListTagsResponse = Array; + type ReposListTeamsResponse = Array; + type ReposListTeamsWithAccessToProtectedBranchResponse = Array< + ReposListTeamsWithAccessToProtectedBranchResponseItem + >; + type ReposListUsersWithAccessToProtectedBranchResponse = Array< + ReposListUsersWithAccessToProtectedBranchResponseItem + >; + type ReposRemoveProtectedBranchAppRestrictionsResponse = Array< + ReposRemoveProtectedBranchAppRestrictionsResponseItem + >; + type ReposRemoveProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposRemoveProtectedBranchTeamRestrictionsResponse = Array< + ReposRemoveProtectedBranchTeamRestrictionsResponseItem + >; + type ReposRemoveProtectedBranchUserRestrictionsResponse = Array< + ReposRemoveProtectedBranchUserRestrictionsResponseItem + >; + type ReposReplaceProtectedBranchAppRestrictionsResponse = Array< + ReposReplaceProtectedBranchAppRestrictionsResponseItem + >; + type ReposReplaceProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposReplaceProtectedBranchTeamRestrictionsResponse = Array< + ReposReplaceProtectedBranchTeamRestrictionsResponseItem + >; + type ReposReplaceProtectedBranchUserRestrictionsResponse = Array< + ReposReplaceProtectedBranchUserRestrictionsResponseItem + >; + type TeamsListResponse = Array; + type TeamsListChildResponse = Array; + type TeamsListChildInOrgResponse = Array; + type TeamsListChildLegacyResponse = Array; + type TeamsListDiscussionCommentsResponse = Array< + TeamsListDiscussionCommentsResponseItem + >; + type TeamsListDiscussionCommentsInOrgResponse = Array< + TeamsListDiscussionCommentsInOrgResponseItem + >; + type TeamsListDiscussionCommentsLegacyResponse = Array< + TeamsListDiscussionCommentsLegacyResponseItem + >; + type TeamsListDiscussionsResponse = Array; + type TeamsListDiscussionsInOrgResponse = Array< + TeamsListDiscussionsInOrgResponseItem + >; + type TeamsListDiscussionsLegacyResponse = Array< + TeamsListDiscussionsLegacyResponseItem + >; + type TeamsListForAuthenticatedUserResponse = Array< + TeamsListForAuthenticatedUserResponseItem + >; + type TeamsListMembersResponse = Array; + type TeamsListMembersInOrgResponse = Array; + type TeamsListMembersLegacyResponse = Array< + TeamsListMembersLegacyResponseItem + >; + type TeamsListPendingInvitationsResponse = Array< + TeamsListPendingInvitationsResponseItem + >; + type TeamsListPendingInvitationsInOrgResponse = Array< + TeamsListPendingInvitationsInOrgResponseItem + >; + type TeamsListPendingInvitationsLegacyResponse = Array< + TeamsListPendingInvitationsLegacyResponseItem + >; + type TeamsListProjectsResponse = Array; + type TeamsListProjectsInOrgResponse = Array< + TeamsListProjectsInOrgResponseItem + >; + type TeamsListProjectsLegacyResponse = Array< + TeamsListProjectsLegacyResponseItem + >; + type TeamsListReposResponse = Array; + type TeamsListReposInOrgResponse = Array; + type TeamsListReposLegacyResponse = Array; + type UsersAddEmailsResponse = Array; + type UsersListResponse = Array; + type UsersListBlockedResponse = Array; + type UsersListEmailsResponse = Array; + type UsersListFollowersForAuthenticatedUserResponse = Array< + UsersListFollowersForAuthenticatedUserResponseItem + >; + type UsersListFollowersForUserResponse = Array< + UsersListFollowersForUserResponseItem + >; + type UsersListFollowingForAuthenticatedUserResponse = Array< + UsersListFollowingForAuthenticatedUserResponseItem + >; + type UsersListFollowingForUserResponse = Array< + UsersListFollowingForUserResponseItem + >; + type UsersListGpgKeysResponse = Array; + type UsersListGpgKeysForUserResponse = Array< + UsersListGpgKeysForUserResponseItem + >; + type UsersListPublicEmailsResponse = Array; + type UsersListPublicKeysResponse = Array; + type UsersListPublicKeysForUserResponse = Array< + UsersListPublicKeysForUserResponseItem + >; + type UsersTogglePrimaryEmailVisibilityResponse = Array< + UsersTogglePrimaryEmailVisibilityResponseItem + >; + + // param types + export type ActivityCheckStarringRepoParams = { + owner: string; + + repo: string; + }; + export type ActivityCheckWatchingRepoLegacyParams = { + owner: string; + + repo: string; + }; + export type ActivityDeleteRepoSubscriptionParams = { + owner: string; + + repo: string; + }; + export type ActivityDeleteThreadSubscriptionParams = { + thread_id: number; + }; + export type ActivityGetRepoSubscriptionParams = { + owner: string; + + repo: string; + }; + export type ActivityGetThreadParams = { + thread_id: number; + }; + export type ActivityGetThreadSubscriptionParams = { + thread_id: number; + }; + export type ActivityListEventsForOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListNotificationsParams = { + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * 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; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * 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; + }; + export type ActivityListNotificationsForRepoParams = { + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * 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; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: 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?: string; + }; + export type ActivityListPublicEventsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type ActivityListPublicEventsForOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type ActivityListPublicEventsForRepoNetworkParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ActivityListPublicEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListReceivedEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListReceivedPublicEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListRepoEventsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ActivityListReposStarredByAuthenticatedUserParams = { + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + }; + export type ActivityListReposStarredByUserParams = { + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + + username: string; + }; + export type ActivityListReposWatchedByUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListStargazersForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ActivityListWatchedReposForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type ActivityListWatchersForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ActivityMarkAsReadParams = { + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. 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; + }; + export type ActivityMarkNotificationsAsReadForRepoParams = { + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. 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; + + owner: string; + + repo: string; + }; + export type ActivityMarkThreadAsReadParams = { + thread_id: number; + }; + export type ActivitySetRepoSubscriptionParams = { + /** + * Determines if all notifications should be blocked from this repository. + */ + ignored?: boolean; + + owner: string; + + repo: string; + /** + * Determines if notifications should be received from this repository. + */ + subscribed?: boolean; + }; + export type ActivitySetThreadSubscriptionParams = { + /** + * Unsubscribes and subscribes you to a conversation. Set `ignored` to `true` to block all notifications from this thread. + */ + ignored?: boolean; + + thread_id: number; + }; + export type ActivityStarRepoParams = { + owner: string; + + repo: string; + }; + export type ActivityStopWatchingRepoLegacyParams = { + owner: string; + + repo: string; + }; + export type ActivityUnstarRepoParams = { + owner: string; + + repo: string; + }; + export type ActivityWatchRepoLegacyParams = { + owner: string; + + repo: string; + }; + export type AppsAddRepoToInstallationParams = { + installation_id: number; + + repository_id: number; + }; + export type AppsCheckAccountIsAssociatedWithAnyParams = { + account_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsCheckAccountIsAssociatedWithAnyStubbedParams = { + account_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsCheckAuthorizationParams = { + access_token: string; + + client_id: string; + }; + export type AppsCheckTokenParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; + }; + export type AppsCreateContentAttachmentParams = { + /** + * The body text of the content attachment displayed in the body or comment of an issue or pull request. This parameter supports markdown. + */ + body: string; + + content_reference_id: number; + /** + * The title of the content attachment displayed in the body or comment of an issue or pull request. + */ + title: string; + }; + export type AppsCreateFromManifestParams = { + code: string; + }; + export type AppsCreateInstallationTokenParams = { + installation_id: number; + /** + * The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see "[GitHub App permissions](https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url-parameters/#github-app-permissions)." + */ + permissions?: AppsCreateInstallationTokenParamsPermissions; + /** + * The `id`s of the repositories that the installation token can access. Providing repository `id`s restricts the access of an installation token to specific repositories. You can use the "[List repositories](https://developer.github.com/v3/apps/installations/#list-repositories)" endpoint to get the `id` of all repositories that an installation can access. For example, you can select specific repositories when creating an installation token to restrict the number of repositories that can be cloned using the token. + */ + repository_ids?: number[]; + }; + export type AppsDeleteAuthorizationParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; + }; + export type AppsDeleteInstallationParams = { + installation_id: number; + }; + export type AppsDeleteTokenParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; + }; + export type AppsFindOrgInstallationParams = { + org: string; + }; + export type AppsFindRepoInstallationParams = { + owner: string; + + repo: string; + }; + export type AppsFindUserInstallationParams = { + username: string; + }; + export type AppsGetBySlugParams = { + app_slug: string; + }; + export type AppsGetInstallationParams = { + installation_id: number; + }; + export type AppsGetOrgInstallationParams = { + org: string; + }; + export type AppsGetRepoInstallationParams = { + owner: string; + + repo: string; + }; + export type AppsGetUserInstallationParams = { + username: string; + }; + export type AppsListAccountsUserOrOrgOnPlanParams = { + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; + }; + export type AppsListAccountsUserOrOrgOnPlanStubbedParams = { + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; + }; + export type AppsListInstallationReposForAuthenticatedUserParams = { + installation_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListInstallationsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListInstallationsForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListMarketplacePurchasesForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListPlansParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListPlansStubbedParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListReposParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsRemoveRepoFromInstallationParams = { + installation_id: number; + + repository_id: number; + }; + export type AppsResetAuthorizationParams = { + access_token: string; + + client_id: string; + }; + export type AppsResetTokenParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; + }; + export type AppsRevokeAuthorizationForApplicationParams = { + access_token: string; + + client_id: string; + }; + export type AppsRevokeGrantForApplicationParams = { + access_token: string; + + client_id: string; + }; + export type ChecksCreateParams = { + /** + * 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://developer.github.com/v3/activity/events/types/#checkrunevent) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksCreateParamsActions[]; + /** + * 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; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * The SHA of the commit. + */ + head_sha: string; + /** + * The name of the check. For example, "code-coverage". + */ + name: string; + /** + * 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://developer.github.com/v3/checks/runs/#output-object) description. + */ + output?: ChecksCreateParamsOutput; + + owner: string; + + repo: string; + /** + * 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; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + }; + export type ChecksCreateSuiteParams = { + /** + * The sha of the head commit. + */ + head_sha: string; + + owner: string; + + repo: string; + }; + export type ChecksGetParams = { + check_run_id: number; + + owner: string; + + repo: string; + }; + export type ChecksGetSuiteParams = { + check_suite_id: number; + + owner: string; + + repo: string; + }; + export type ChecksListAnnotationsParams = { + check_run_id: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ChecksListForRefParams = { + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + ref: string; + + repo: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + }; + export type ChecksListForSuiteParams = { + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + + check_suite_id: number; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + }; + export type ChecksListSuitesForRefParams = { + /** + * Filters check suites by GitHub App `id`. + */ + app_id?: number; + /** + * Filters checks suites by the name of the [check run](https://developer.github.com/v3/checks/runs/). + */ + check_name?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + ref: string; + + repo: string; + }; + export type ChecksRerequestSuiteParams = { + check_suite_id: number; + + owner: string; + + repo: string; + }; + export type ChecksSetSuitesPreferencesParams = { + /** + * Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://developer.github.com/v3/checks/suites/#auto_trigger_checks-object) description for details. + */ + auto_trigger_checks?: ChecksSetSuitesPreferencesParamsAutoTriggerChecks[]; + + owner: string; + + repo: string; + }; + export type ChecksUpdateParams = { + /** + * 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://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksUpdateParamsActions[]; + + check_run_id: number; + /** + * 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; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * The name of the check. For example, "code-coverage". + */ + name?: string; + /** + * 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://developer.github.com/v3/checks/runs/#output-object-1) description. + */ + output?: ChecksUpdateParamsOutput; + + owner: string; + + repo: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + }; + export type CodesOfConductGetConductCodeParams = { + key: string; + }; + export type CodesOfConductGetForRepoParams = { + owner: string; + + repo: string; + }; + export type GistsCheckIsStarredParams = { + gist_id: string; + }; + export type GistsCreateParams = { + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * The filenames and content of each file in the gist. The keys in the `files` object represent the filename and have the type `string`. + */ + files: GistsCreateParamsFiles; + /** + * When `true`, the gist will be public and available for anyone to see. + */ + public?: boolean; + }; + export type GistsCreateCommentParams = { + /** + * The comment text. + */ + body: string; + + gist_id: string; + }; + export type GistsDeleteParams = { + gist_id: string; + }; + export type GistsDeleteCommentParams = { + comment_id: number; + + gist_id: string; + }; + export type GistsForkParams = { + gist_id: string; + }; + export type GistsGetParams = { + gist_id: string; + }; + export type GistsGetCommentParams = { + comment_id: number; + + gist_id: string; + }; + export type GistsGetRevisionParams = { + gist_id: string; + + sha: string; + }; + export type GistsListParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + }; + export type GistsListCommentsParams = { + gist_id: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type GistsListCommitsParams = { + gist_id: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type GistsListForksParams = { + gist_id: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type GistsListPublicParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + }; + export type GistsListPublicForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + + username: string; + }; + export type GistsListStarredParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + }; + export type GistsStarParams = { + gist_id: string; + }; + export type GistsUnstarParams = { + gist_id: string; + }; + export type GistsUpdateParams = { + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * The filenames and content that make up this gist. + */ + files?: GistsUpdateParamsFiles; + + gist_id: string; + }; + export type GistsUpdateCommentParams = { + /** + * The comment text. + */ + body: string; + + comment_id: number; + + gist_id: string; + }; + export type GitCreateBlobParams = { + /** + * The new blob's content. + */ + content: string; + /** + * The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + */ + encoding?: string; + + owner: string; + + repo: string; + }; + export type GitCreateCommitParams = { + /** + * 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?: GitCreateCommitParamsAuthor; + /** + * 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?: GitCreateCommitParamsCommitter; + /** + * The commit message + */ + message: string; + + owner: string; + /** + * 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[]; + + repo: string; + /** + * 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; + /** + * The SHA of the tree object this commit points to + */ + tree: string; + }; + export type GitCreateRefParams = { + owner: string; + /** + * 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; + + repo: string; + /** + * The SHA1 value for this reference. + */ + sha: string; + }; + export type GitCreateTagParams = { + /** + * The tag message. + */ + message: string; + /** + * The SHA of the git object this is tagging. + */ + object: string; + + owner: string; + + repo: string; + /** + * The tag's name. This is typically a version (e.g., "v0.0.1"). + */ + tag: string; + /** + * An object with information about the individual creating the tag. + */ + tagger?: GitCreateTagParamsTagger; + /** + * The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + */ + type: "commit" | "tree" | "blob"; + }; + export type GitCreateTreeParams = { + /** + * The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. + */ + base_tree?: string; + + owner: string; + + repo: string; + /** + * Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. + */ + tree: GitCreateTreeParamsTree[]; + }; + export type GitDeleteRefParams = { + owner: string; + + ref: string; + + repo: string; + }; + export type GitGetBlobParams = { + file_sha: string; + + owner: string; + + repo: string; + }; + export type GitGetCommitParams = { + commit_sha: string; + + owner: string; + + repo: string; + }; + export type GitGetRefParams = { + owner: string; + + ref: string; + + repo: string; + }; + export type GitGetTagParams = { + owner: string; + + repo: string; + + tag_sha: string; + }; + export type GitGetTreeParams = { + owner: string; + + recursive?: "1"; + + repo: string; + + tree_sha: string; + }; + export type GitListMatchingRefsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + ref: string; + + repo: string; + }; + export type GitListRefsParams = { + /** + * Filter by sub-namespace (reference prefix). Most commen examples would be `'heads/'` and `'tags/'` to retrieve branches or tags + */ + namespace?: string; + + owner: string; + + page?: number; + + per_page?: number; + + repo: string; + }; + export type GitUpdateRefParams = { + /** + * 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. + */ + force?: boolean; + + owner: string; + + ref: string; + + repo: string; + /** + * The SHA1 value to set this reference to + */ + sha: string; + }; + export type GitignoreGetTemplateParams = { + name: string; + }; + export type InteractionsAddOrUpdateRestrictionsForOrgParams = { + /** + * Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + */ + limit: "existing_users" | "contributors_only" | "collaborators_only"; + + org: string; + }; + export type InteractionsAddOrUpdateRestrictionsForRepoParams = { + /** + * Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + */ + limit: "existing_users" | "contributors_only" | "collaborators_only"; + + owner: string; + + repo: string; + }; + export type InteractionsGetRestrictionsForOrgParams = { + org: string; + }; + export type InteractionsGetRestrictionsForRepoParams = { + owner: string; + + repo: string; + }; + export type InteractionsRemoveRestrictionsForOrgParams = { + org: string; + }; + export type InteractionsRemoveRestrictionsForRepoParams = { + owner: string; + + repo: string; + }; + export type IssuesAddAssigneesParamsDeprecatedNumber = { + /** + * 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[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesAddAssigneesParams = { + /** + * 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[]; + + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesAddLabelsParamsDeprecatedNumber = { + /** + * The name of the label to add to the issue. Must contain at least one label. **Note:** 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. + */ + labels: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesAddLabelsParams = { + issue_number: number; + /** + * The name of the label to add to the issue. Must contain at least one label. **Note:** 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. + */ + labels: string[]; + + owner: string; + + repo: string; + }; + export type IssuesCheckAssigneeParams = { + assignee: string; + + owner: string; + + repo: string; + }; + export type IssuesCreateParamsDeprecatedAssignee = { + /** + * 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.**_ + * @deprecated "assignee" parameter has been deprecated and will be removed in future + */ + assignee?: string; + /** + * 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[]; + /** + * The contents of the issue. + */ + body?: string; + /** + * 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[]; + /** + * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ + */ + milestone?: number; + + owner: string; + + repo: string; + /** + * The title of the issue. + */ + title: string; + }; + export type IssuesCreateParams = { + /** + * 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[]; + /** + * The contents of the issue. + */ + body?: string; + /** + * 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[]; + /** + * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ + */ + milestone?: number; + + owner: string; + + repo: string; + /** + * The title of the issue. + */ + title: string; + }; + export type IssuesCreateCommentParamsDeprecatedNumber = { + /** + * The contents of the comment. + */ + body: string; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesCreateCommentParams = { + /** + * The contents of the comment. + */ + body: string; + + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesCreateLabelParams = { + /** + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + */ + color: string; + /** + * A short description of the label. + */ + description?: string; + /** + * 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.com](http://emoji-cheat-sheet.com/). + */ + name: string; + + owner: string; + + repo: string; + }; + export type IssuesCreateMilestoneParams = { + /** + * A description of the milestone. + */ + description?: string; + /** + * 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; + + owner: string; + + repo: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the milestone. + */ + title: string; + }; + export type IssuesDeleteCommentParams = { + comment_id: number; + + owner: string; + + repo: string; + }; + export type IssuesDeleteLabelParams = { + name: string; + + owner: string; + + repo: string; + }; + export type IssuesDeleteMilestoneParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesDeleteMilestoneParams = { + milestone_number: number; + + owner: string; + + repo: string; + }; + export type IssuesGetParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesGetParams = { + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesGetCommentParams = { + comment_id: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesGetEventParams = { + event_id: number; + + owner: string; + + repo: string; + }; + export type IssuesGetLabelParams = { + name: string; + + owner: string; + + repo: string; + }; + export type IssuesGetMilestoneParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesGetMilestoneParams = { + milestone_number: number; + + owner: string; + + repo: string; + }; + export type IssuesListParams = { + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type IssuesListAssigneesParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListCommentsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + }; + export type IssuesListCommentsParams = { + issue_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + }; + export type IssuesListCommentsForRepoParams = { + /** + * Either `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + + owner: string; + + repo: string; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Either `created` or `updated`. + */ + sort?: "created" | "updated"; + }; + export type IssuesListEventsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListEventsParams = { + issue_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListEventsForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListEventsForTimelineParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListEventsForTimelineParams = { + issue_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListForAuthenticatedUserParams = { + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type IssuesListForOrgParams = { + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type IssuesListForRepoParams = { + /** + * 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; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * A user that's mentioned in the issue. + */ + mentioned?: string; + /** + * 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; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type IssuesListLabelsForMilestoneParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListLabelsForMilestoneParams = { + milestone_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListLabelsForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListLabelsOnIssueParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListLabelsOnIssueParams = { + issue_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListMilestonesForRepoParams = { + /** + * The direction of the sort. Either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * What to sort results by. Either `due_on` or `completeness`. + */ + sort?: "due_on" | "completeness"; + /** + * The state of the milestone. Either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type IssuesLockParamsDeprecatedNumber = { + /** + * 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` + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesLockParams = { + issue_number: number; + /** + * 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` + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + + owner: string; + + repo: string; + }; + export type IssuesRemoveAssigneesParamsDeprecatedNumber = { + /** + * 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[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesRemoveAssigneesParams = { + /** + * 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_number: number; + + owner: string; + + repo: string; + }; + export type IssuesRemoveLabelParamsDeprecatedNumber = { + name: string; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesRemoveLabelParams = { + issue_number: number; + + name: string; + + owner: string; + + repo: string; + }; + export type IssuesRemoveLabelsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesRemoveLabelsParams = { + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesReplaceLabelsParamsDeprecatedNumber = { + /** + * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** 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. + */ + labels?: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesReplaceLabelsParams = { + issue_number: number; + /** + * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** 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. + */ + labels?: string[]; + + owner: string; + + repo: string; + }; + export type IssuesUnlockParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesUnlockParams = { + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesUpdateParamsDeprecatedNumber = { + /** + * 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[]; + /** + * The contents of the issue. + */ + body?: string; + /** + * 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[]; + /** + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + */ + milestone?: number | null; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the issue. + */ + title?: string; + }; + export type IssuesUpdateParamsDeprecatedAssignee = { + /** + * Login for the user that this issue should be assigned to. **This field is deprecated.** + * @deprecated "assignee" parameter has been deprecated and will be removed in future + */ + assignee?: string; + /** + * 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[]; + /** + * The contents of the issue. + */ + body?: string; + + issue_number: number; + /** + * 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[]; + /** + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + */ + milestone?: number | null; + + owner: string; + + repo: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the issue. + */ + title?: string; + }; + export type IssuesUpdateParams = { + /** + * 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[]; + /** + * The contents of the issue. + */ + body?: string; + + issue_number: number; + /** + * 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[]; + /** + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + */ + milestone?: number | null; + + owner: string; + + repo: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the issue. + */ + title?: string; + }; + export type IssuesUpdateCommentParams = { + /** + * The contents of the comment. + */ + body: string; + + comment_id: number; + + owner: string; + + repo: string; + }; + export type IssuesUpdateLabelParams = { + /** + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + */ + color?: string; + + current_name: string; + /** + * A short description of the label. + */ + description?: string; + /** + * 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.com](http://emoji-cheat-sheet.com/). + */ + name?: string; + + owner: string; + + repo: string; + }; + export type IssuesUpdateMilestoneParamsDeprecatedNumber = { + /** + * A description of the milestone. + */ + description?: string; + /** + * 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; + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the milestone. + */ + title?: string; + }; + export type IssuesUpdateMilestoneParams = { + /** + * A description of the milestone. + */ + description?: string; + /** + * 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; + + milestone_number: number; + + owner: string; + + repo: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the milestone. + */ + title?: string; + }; + export type LicensesGetParams = { + license: string; + }; + export type LicensesGetForRepoParams = { + owner: string; + + repo: string; + }; + export type MarkdownRenderParams = { + /** + * The repository context to use when creating references in `gfm` mode. Omit this parameter when using `markdown` mode. + */ + context?: string; + /** + * The rendering mode. Can be either: + * \* `markdown` to render a document in plain Markdown, just like README.md files are rendered. + * \* `gfm` to render a document in [GitHub Flavored Markdown](https://github.github.com/gfm/), which creates links for user mentions as well as references to SHA-1 hashes, issues, and pull requests. + */ + mode?: "markdown" | "gfm"; + /** + * The Markdown text to render in HTML. Markdown content must be 400 KB or less. + */ + text: string; + }; + export type MarkdownRenderRawParams = { + data: string; + }; + export type MigrationsCancelImportParams = { + owner: string; + + repo: string; + }; + export type MigrationsDeleteArchiveForAuthenticatedUserParams = { + migration_id: number; + }; + export type MigrationsDeleteArchiveForOrgParams = { + migration_id: number; + + org: string; + }; + export type MigrationsGetArchiveForAuthenticatedUserParams = { + migration_id: number; + }; + export type MigrationsGetArchiveForOrgParams = { + migration_id: number; + + org: string; + }; + export type MigrationsGetCommitAuthorsParams = { + owner: string; + + repo: string; + /** + * Only authors found after this id are returned. Provide the highest author ID you've seen so far. New authors may be added to the list at any point while the importer is performing the `raw` step. + */ + since?: string; + }; + export type MigrationsGetImportProgressParams = { + owner: string; + + repo: string; + }; + export type MigrationsGetLargeFilesParams = { + owner: string; + + repo: string; + }; + export type MigrationsGetStatusForAuthenticatedUserParams = { + migration_id: number; + }; + export type MigrationsGetStatusForOrgParams = { + migration_id: number; + + org: string; + }; + export type MigrationsListForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type MigrationsListForOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type MigrationsListReposForOrgParams = { + migration_id: number; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type MigrationsListReposForUserParams = { + migration_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type MigrationsMapCommitAuthorParams = { + author_id: number; + /** + * The new Git author email. + */ + email?: string; + /** + * The new Git author name. + */ + name?: string; + + owner: string; + + repo: string; + }; + export type MigrationsSetLfsPreferenceParams = { + owner: string; + + repo: string; + /** + * Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). + */ + use_lfs: "opt_in" | "opt_out"; + }; + export type MigrationsStartForAuthenticatedUserParams = { + /** + * Does not include attachments uploaded to GitHub.com in the migration data when set to `true`. Excluding attachments will reduce the migration archive file size. + */ + exclude_attachments?: boolean; + /** + * Locks the `repositories` to prevent changes during the migration when set to `true`. + */ + lock_repositories?: boolean; + /** + * An array of repositories to include in the migration. + */ + repositories: string[]; + }; + export type MigrationsStartForOrgParams = { + /** + * Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + */ + exclude_attachments?: boolean; + /** + * Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + */ + lock_repositories?: boolean; + + org: string; + /** + * A list of arrays indicating which repositories should be migrated. + */ + repositories: string[]; + }; + export type MigrationsStartImportParams = { + owner: string; + + repo: string; + /** + * For a tfvc import, the name of the project that is being imported. + */ + tfvc_project?: string; + /** + * The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** + * If authentication is required, the password to provide to `vcs_url`. + */ + vcs_password?: string; + /** + * The URL of the originating repository. + */ + vcs_url: string; + /** + * If authentication is required, the username to provide to `vcs_url`. + */ + vcs_username?: string; + }; + export type MigrationsUnlockRepoForAuthenticatedUserParams = { + migration_id: number; + + repo_name: string; + }; + export type MigrationsUnlockRepoForOrgParams = { + migration_id: number; + + org: string; + + repo_name: string; + }; + export type MigrationsUpdateImportParams = { + owner: string; + + repo: string; + /** + * The password to provide to the originating repository. + */ + vcs_password?: string; + /** + * The username to provide to the originating repository. + */ + vcs_username?: string; + }; + export type OauthAuthorizationsCheckAuthorizationParams = { + access_token: string; + + client_id: string; + }; + export type OauthAuthorizationsCreateAuthorizationParams = { + /** + * The 20 character OAuth app client key for which to create the token. + */ + client_id?: string; + /** + * The 40 character OAuth app client secret for which to create the token. + */ + client_secret?: string; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + }; + export type OauthAuthorizationsDeleteAuthorizationParams = { + authorization_id: number; + }; + export type OauthAuthorizationsDeleteGrantParams = { + grant_id: number; + }; + export type OauthAuthorizationsGetAuthorizationParams = { + authorization_id: number; + }; + export type OauthAuthorizationsGetGrantParams = { + grant_id: number; + }; + export type OauthAuthorizationsGetOrCreateAuthorizationForAppParams = { + client_id: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to [Get-or-create an authorization for a specific app and fingerprint](https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint). + */ + fingerprint?: string; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + }; + export type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams = { + client_id: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + + fingerprint: string; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + }; + export type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams = { + client_id: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + + fingerprint: string; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + }; + export type OauthAuthorizationsListAuthorizationsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OauthAuthorizationsListGrantsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OauthAuthorizationsResetAuthorizationParams = { + access_token: string; + + client_id: string; + }; + export type OauthAuthorizationsRevokeAuthorizationForApplicationParams = { + access_token: string; + + client_id: string; + }; + export type OauthAuthorizationsRevokeGrantForApplicationParams = { + access_token: string; + + client_id: string; + }; + export type OauthAuthorizationsUpdateAuthorizationParams = { + /** + * A list of scopes to add to this authorization. + */ + add_scopes?: string[]; + + authorization_id: number; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes to remove from this authorization. + */ + remove_scopes?: string[]; + /** + * Replaces the authorization scopes with these. + */ + scopes?: string[]; + }; + export type OrgsAddOrUpdateMembershipParams = { + org: string; + /** + * 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. + */ + role?: "admin" | "member"; + + username: string; + }; + export type OrgsBlockUserParams = { + org: string; + + username: string; + }; + export type OrgsCheckBlockedUserParams = { + org: string; + + username: string; + }; + export type OrgsCheckMembershipParams = { + org: string; + + username: string; + }; + export type OrgsCheckPublicMembershipParams = { + org: string; + + username: string; + }; + export type OrgsConcealMembershipParams = { + org: string; + + username: string; + }; + export type OrgsConvertMemberToOutsideCollaboratorParams = { + org: string; + + username: string; + }; + export type OrgsCreateHookParams = { + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#create-hook-config-params). + */ + config: OrgsCreateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Must be passed as "web". + */ + name: string; + + org: string; + }; + export type OrgsCreateInvitationParams = { + /** + * **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. + */ + email?: string; + /** + * **Required unless you provide `email`**. GitHub user ID for the person you are inviting. + */ + invitee_id?: number; + + org: string; + /** + * Specify role for new member. Can be one of: + * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. + * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. + * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** + * Specify IDs for the teams you want to invite new members to. + */ + team_ids?: number[]; + }; + export type OrgsDeleteHookParams = { + hook_id: number; + + org: string; + }; + export type OrgsGetParams = { + org: string; + }; + export type OrgsGetHookParams = { + hook_id: number; + + org: string; + }; + export type OrgsGetMembershipParams = { + org: string; + + username: string; + }; + export type OrgsGetMembershipForAuthenticatedUserParams = { + org: string; + }; + export type OrgsListParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The integer ID of the last Organization that you've seen. + */ + since?: string; + }; + export type OrgsListBlockedUsersParams = { + org: string; + }; + export type OrgsListForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type OrgsListHooksParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListInstallationsParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListInvitationTeamsParams = { + invitation_id: number; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListMembersParams = { + /** + * Filter members returned in the list. Can be one of: + * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. + * \* `all` - All members the authenticated user can see. + */ + filter?: "2fa_disabled" | "all"; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Filter members returned by their role. Can be one of: + * \* `all` - All members of the organization, regardless of role. + * \* `admin` - Organization owners. + * \* `member` - Non-owner organization members. + */ + role?: "all" | "admin" | "member"; + }; + export type OrgsListMembershipsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * 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"; + }; + export type OrgsListOutsideCollaboratorsParams = { + /** + * Filter the list of outside collaborators. Can be one of: + * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. + * \* `all`: All outside collaborators. + */ + filter?: "2fa_disabled" | "all"; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListPendingInvitationsParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListPublicMembersParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsPingHookParams = { + hook_id: number; + + org: string; + }; + export type OrgsPublicizeMembershipParams = { + org: string; + + username: string; + }; + export type OrgsRemoveMemberParams = { + org: string; + + username: string; + }; + export type OrgsRemoveMembershipParams = { + org: string; + + username: string; + }; + export type OrgsRemoveOutsideCollaboratorParams = { + org: string; + + username: string; + }; + export type OrgsUnblockUserParams = { + org: string; + + username: string; + }; + export type OrgsUpdateParamsDeprecatedMembersAllowedRepositoryCreationType = { + /** + * Billing email address. This address is not publicized. + */ + billing_email?: string; + /** + * The company name. + */ + company?: string; + /** + * Default permission level members have for organization repositories: + * \* `read` - can pull, but not push to or administer this repository. + * \* `write` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push, and administer this repository. + * \* `none` - no permissions granted by default. + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * The description of the company. + */ + description?: string; + /** + * The publicly visible email address. + */ + email?: string; + /** + * Toggles whether an organization can use organization projects. + */ + has_organization_projects?: boolean; + /** + * Toggles whether repositories that belong to the organization can use repository projects. + */ + has_repository_projects?: boolean; + /** + * The location. + */ + location?: string; + /** + * Specifies which types of repositories non-admin organization members can create. Can be one of: + * \* `all` - all organization members can create public and private repositories. + * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * \* `none` - only admin members can create repositories. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + * @deprecated "members_allowed_repository_creation_type" parameter has been deprecated and will be removed in future + */ + members_allowed_repository_creation_type?: string; + /** + * Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud. Can be one of: + * \* `true` - all organization members can create internal repositories. + * \* `false` - only organization owners can create internal repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.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; + /** + * Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: + * \* `true` - all organization members can create private repositories. + * \* `false` - only organization owners can create private repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.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; + /** + * Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: + * \* `true` - all organization members can create public repositories. + * \* `false` - only organization owners can create public repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.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; + /** + * Toggles the ability of non-admin organization members to create repositories. Can be one of: + * \* `true` - all organization members can create repositories. + * \* `false` - only organization owners can create repositories. + * Default: `true` + * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + */ + members_can_create_repositories?: boolean; + /** + * The shorthand name of the company. + */ + name?: string; + + org: string; + }; + export type OrgsUpdateParams = { + /** + * Billing email address. This address is not publicized. + */ + billing_email?: string; + /** + * The company name. + */ + company?: string; + /** + * Default permission level members have for organization repositories: + * \* `read` - can pull, but not push to or administer this repository. + * \* `write` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push, and administer this repository. + * \* `none` - no permissions granted by default. + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * The description of the company. + */ + description?: string; + /** + * The publicly visible email address. + */ + email?: string; + /** + * Toggles whether an organization can use organization projects. + */ + has_organization_projects?: boolean; + /** + * Toggles whether repositories that belong to the organization can use repository projects. + */ + has_repository_projects?: boolean; + /** + * The location. + */ + location?: string; + /** + * Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud. Can be one of: + * \* `true` - all organization members can create internal repositories. + * \* `false` - only organization owners can create internal repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.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; + /** + * Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: + * \* `true` - all organization members can create private repositories. + * \* `false` - only organization owners can create private repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.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; + /** + * Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: + * \* `true` - all organization members can create public repositories. + * \* `false` - only organization owners can create public repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.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; + /** + * Toggles the ability of non-admin organization members to create repositories. Can be one of: + * \* `true` - all organization members can create repositories. + * \* `false` - only organization owners can create repositories. + * Default: `true` + * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + */ + members_can_create_repositories?: boolean; + /** + * The shorthand name of the company. + */ + name?: string; + + org: string; + }; + export type OrgsUpdateHookParams = { + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#update-hook-config-params). + */ + config?: OrgsUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + + hook_id: number; + + org: string; + }; + export type OrgsUpdateMembershipParams = { + org: string; + /** + * The state that the membership should be in. Only `"active"` will be accepted. + */ + state: "active"; + }; + export type ProjectsAddCollaboratorParams = { + /** + * The permission to grant the collaborator. 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://developer.github.com/v3/#http-verbs)." Can be one of: + * \* `read` - can read, but not write to or administer this project. + * \* `write` - can read and write, but not administer this project. + * \* `admin` - can read, write and administer this project. + */ + permission?: "read" | "write" | "admin"; + + project_id: number; + + username: string; + }; + export type ProjectsCreateCardParams = { + column_id: number; + /** + * The issue or pull request id you want to associate with this card. You can use the [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) and [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoints to find this id. + * **Note:** Depending on whether you use the issue id or pull request id, you will need to specify `Issue` or `PullRequest` as the `content_type`. + */ + content_id?: number; + /** + * **Required if you provide `content_id`**. The type of content you want to associate with this card. Use `Issue` when `content_id` is an issue id and use `PullRequest` when `content_id` is a pull request id. + */ + content_type?: string; + /** + * The card's note content. Only valid for cards without another type of content, so you must omit when specifying `content_id` and `content_type`. + */ + note?: string; + }; + export type ProjectsCreateColumnParams = { + /** + * The name of the column. + */ + name: string; + + project_id: number; + }; + export type ProjectsCreateForAuthenticatedUserParams = { + /** + * The description of the project. + */ + body?: string; + /** + * The name of the project. + */ + name: string; + }; + export type ProjectsCreateForOrgParams = { + /** + * The description of the project. + */ + body?: string; + /** + * The name of the project. + */ + name: string; + + org: string; + }; + export type ProjectsCreateForRepoParams = { + /** + * The description of the project. + */ + body?: string; + /** + * The name of the project. + */ + name: string; + + owner: string; + + repo: string; + }; + export type ProjectsDeleteParams = { + project_id: number; + }; + export type ProjectsDeleteCardParams = { + card_id: number; + }; + export type ProjectsDeleteColumnParams = { + column_id: number; + }; + export type ProjectsGetParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + project_id: number; + }; + export type ProjectsGetCardParams = { + card_id: number; + }; + export type ProjectsGetColumnParams = { + column_id: number; + }; + export type ProjectsListCardsParams = { + /** + * Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. + */ + archived_state?: "all" | "archived" | "not_archived"; + + column_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type ProjectsListCollaboratorsParams = { + /** + * Filters the collaborators by their affiliation. Can be one of: + * \* `outside`: Outside collaborators of a project that are not a member of the project's organization. + * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + project_id: number; + }; + export type ProjectsListColumnsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + project_id: number; + }; + export type ProjectsListForOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type ProjectsListForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type ProjectsListForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + + username: string; + }; + export type ProjectsMoveCardParams = { + card_id: number; + /** + * The `id` value of a column in the same project. + */ + column_id?: number; + /** + * Can be one of `top`, `bottom`, or `after:`, where `` is the `id` value of a card in the same column, or in the new column specified by `column_id`. + */ + position: string; + }; + export type ProjectsMoveColumnParams = { + column_id: number; + /** + * Can be one of `first`, `last`, or `after:`, where `` is the `id` value of a column in the same project. + */ + position: string; + }; + export type ProjectsRemoveCollaboratorParams = { + project_id: number; + + username: string; + }; + export type ProjectsReviewUserPermissionLevelParams = { + project_id: number; + + username: string; + }; + export type ProjectsUpdateParams = { + /** + * The description of the project. + */ + body?: string; + /** + * The name of the project. + */ + name?: string; + /** + * The permission level that determines whether all members of the project's organization can see and/or make changes to the project. Setting `organization_permission` is only available for organization projects. If an organization member belongs to a team with a higher level of access or is a collaborator with a higher level of access, their permission level is not lowered by `organization_permission`. For information on changing access for a team or collaborator, see [Add or update team project](https://developer.github.com/v3/teams/#add-or-update-team-project) or [Add user as a collaborator](https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator). + * + * **Note:** Updating a project's `organization_permission` requires `admin` access to the project. + * + * Can be one of: + * \* `read` - Organization members can read, but not write to or administer this project. + * \* `write` - Organization members can read and write, but not administer this project. + * \* `admin` - Organization members can read, write and administer this project. + * \* `none` - Organization members can only see this project if it is public. + */ + organization_permission?: string; + /** + * Sets the visibility of a project board. Setting `private` is only available for organization and user projects. **Note:** Updating a project's visibility requires `admin` access to the project. + * + * Can be one of: + * \* `false` - Anyone can see the project. + * \* `true` - Only the user can view a project board created on a user account. Organization members with the appropriate `organization_permission` can see project boards in an organization account. + */ + private?: boolean; + + project_id: number; + /** + * State of the project. Either `open` or `closed`. + */ + state?: "open" | "closed"; + }; + export type ProjectsUpdateCardParams = { + /** + * Use `true` to archive a project card. Specify `false` if you need to restore a previously archived project card. + */ + archived?: boolean; + + card_id: number; + /** + * The card's note content. Only valid for cards without another type of content, so this cannot be specified if the card already has a `content_id` and `content_type`. + */ + note?: string; + }; + export type ProjectsUpdateColumnParams = { + column_id: number; + /** + * The new name of the column. + */ + name: string; + }; + export type PullsCheckIfMergedParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type PullsCheckIfMergedParams = { + owner: string; + + pull_number: number; + + repo: string; + }; + export type PullsCreateParams = { + /** + * 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; + /** + * The contents of the pull request. + */ + body?: string; + /** + * Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. + */ + draft?: boolean; + /** + * 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; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + + owner: string; + + repo: string; + /** + * The title of the new pull request. + */ + title: string; + }; + export type PullsCreateCommentParamsDeprecatedNumber = { + /** + * The text of the review comment. + */ + body: string; + /** + * 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; + /** + * **Required with `comfort-fade` preview**. 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; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. 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; + + repo: string; + /** + * **Required with `comfort-fade` preview**. 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://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.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. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateCommentParamsDeprecatedInReplyTo = { + /** + * The text of the review comment. + */ + body: string; + /** + * 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; + /** + * The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported. + * @deprecated "in_reply_to" parameter has been deprecated and will be removed in future + */ + in_reply_to?: number; + /** + * **Required with `comfort-fade` preview**. 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; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. 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; + + pull_number: number; + + repo: string; + /** + * **Required with `comfort-fade` preview**. 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://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.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. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateCommentParams = { + /** + * The text of the review comment. + */ + body: string; + /** + * 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; + /** + * **Required with `comfort-fade` preview**. 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; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. 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; + + pull_number: number; + + repo: string; + /** + * **Required with `comfort-fade` preview**. 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://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.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. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateCommentReplyParamsDeprecatedNumber = { + /** + * The text of the review comment. + */ + body: string; + /** + * 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; + /** + * **Required with `comfort-fade` preview**. 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; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. 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; + + repo: string; + /** + * **Required with `comfort-fade` preview**. 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://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.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. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateCommentReplyParamsDeprecatedInReplyTo = { + /** + * The text of the review comment. + */ + body: string; + /** + * 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; + /** + * The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported. + * @deprecated "in_reply_to" parameter has been deprecated and will be removed in future + */ + in_reply_to?: number; + /** + * **Required with `comfort-fade` preview**. 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; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. 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; + + pull_number: number; + + repo: string; + /** + * **Required with `comfort-fade` preview**. 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://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.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. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateCommentReplyParams = { + /** + * The text of the review comment. + */ + body: string; + /** + * 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; + /** + * **Required with `comfort-fade` preview**. 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; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. 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; + + pull_number: number; + + repo: string; + /** + * **Required with `comfort-fade` preview**. 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://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.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. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateFromIssueParams = { + base: string; + + draft?: boolean; + + head: string; + + issue: number; + + maintainer_can_modify?: boolean; + + owner: string; + + repo: string; + }; + export type PullsCreateReviewParamsDeprecatedNumber = { + /** + * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. + */ + body?: string; + /** + * Use the following table to specify the location, destination, and contents of the draft review comment. + */ + comments?: PullsCreateReviewParamsComments[]; + /** + * 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; + /** + * 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://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type PullsCreateReviewParams = { + /** + * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. + */ + body?: string; + /** + * Use the following table to specify the location, destination, and contents of the draft review comment. + */ + comments?: PullsCreateReviewParamsComments[]; + /** + * 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; + /** + * 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://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + + owner: string; + + pull_number: number; + + repo: string; + }; + export type PullsCreateReviewCommentReplyParams = { + /** + * The text of the review comment. + */ + body: string; + + comment_id: number; + + owner: string; + + pull_number: number; + + repo: string; + }; + export type PullsCreateReviewRequestParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * An array of user `login`s that will be requested. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be requested. + */ + team_reviewers?: string[]; + }; + export type PullsCreateReviewRequestParams = { + owner: string; + + pull_number: number; + + repo: string; + /** + * An array of user `login`s that will be requested. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be requested. + */ + team_reviewers?: string[]; + }; + export type PullsDeleteCommentParams = { + comment_id: number; + + owner: string; + + repo: string; + }; + export type PullsDeletePendingReviewParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + + review_id: number; + }; + export type PullsDeletePendingReviewParams = { + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type PullsDeleteReviewRequestParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * An array of user `login`s that will be removed. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be removed. + */ + team_reviewers?: string[]; + }; + export type PullsDeleteReviewRequestParams = { + owner: string; + + pull_number: number; + + repo: string; + /** + * An array of user `login`s that will be removed. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be removed. + */ + team_reviewers?: string[]; + }; + export type PullsDismissReviewParamsDeprecatedNumber = { + /** + * The message for the pull request review dismissal + */ + message: string; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + + review_id: number; + }; + export type PullsDismissReviewParams = { + /** + * The message for the pull request review dismissal + */ + message: string; + + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type PullsGetParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type PullsGetParams = { + owner: string; + + pull_number: number; + + repo: string; + }; + export type PullsGetCommentParams = { + comment_id: number; + + owner: string; + + repo: string; + }; + export type PullsGetCommentsForReviewParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + + review_id: number; + }; + export type PullsGetCommentsForReviewParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type PullsGetReviewParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + + review_id: number; + }; + export type PullsGetReviewParams = { + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type PullsListParams = { + /** + * Filter pulls by base branch name. Example: `gh-pages`. + */ + base?: string; + /** + * 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"; + /** + * 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; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: 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"; + /** + * Either `open`, `closed`, or `all` to filter by state. + */ + state?: "open" | "closed" | "all"; + }; + export type PullsListCommentsParamsDeprecatedNumber = { + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + }; + export type PullsListCommentsParams = { + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + }; + export type PullsListCommentsForRepoParams = { + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + }; + export type PullsListCommitsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type PullsListCommitsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + }; + export type PullsListFilesParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type PullsListFilesParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + }; + export type PullsListReviewRequestsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type PullsListReviewRequestsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + }; + export type PullsListReviewsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type PullsListReviewsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + }; + export type PullsMergeParamsDeprecatedNumber = { + /** + * Extra detail to append to automatic commit message. + */ + commit_message?: string; + /** + * Title for the automatic commit message. + */ + commit_title?: string; + /** + * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + */ + merge_method?: "merge" | "squash" | "rebase"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * SHA that pull request head must match to allow merge. + */ + sha?: string; + }; + export type PullsMergeParams = { + /** + * Extra detail to append to automatic commit message. + */ + commit_message?: string; + /** + * Title for the automatic commit message. + */ + commit_title?: string; + /** + * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + */ + merge_method?: "merge" | "squash" | "rebase"; + + owner: string; + + pull_number: number; + + repo: string; + /** + * SHA that pull request head must match to allow merge. + */ + sha?: string; + }; + export type PullsSubmitReviewParamsDeprecatedNumber = { + /** + * The body text of the pull request review + */ + body?: string; + /** + * 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. + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + + review_id: number; + }; + export type PullsSubmitReviewParams = { + /** + * The body text of the pull request review + */ + body?: string; + /** + * 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. + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type PullsUpdateParamsDeprecatedNumber = { + /** + * 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; + /** + * The contents of the pull request. + */ + body?: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * State of this Pull Request. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the pull request. + */ + title?: string; + }; + export type PullsUpdateParams = { + /** + * 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; + /** + * The contents of the pull request. + */ + body?: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + + owner: string; + + pull_number: number; + + repo: string; + /** + * State of this Pull Request. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the pull request. + */ + title?: string; + }; + export type PullsUpdateBranchParams = { + /** + * 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 on a repository](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. + */ + expected_head_sha?: string; + + owner: string; + + pull_number: number; + + repo: string; + }; + export type PullsUpdateCommentParams = { + /** + * The text of the reply to the review comment. + */ + body: string; + + comment_id: number; + + owner: string; + + repo: string; + }; + export type PullsUpdateReviewParamsDeprecatedNumber = { + /** + * The body text of the pull request review. + */ + body: string; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + + review_id: number; + }; + export type PullsUpdateReviewParams = { + /** + * The body text of the pull request review. + */ + body: string; + + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type ReactionsCreateForCommitCommentParams = { + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the commit comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + + repo: string; + }; + export type ReactionsCreateForIssueParamsDeprecatedNumber = { + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type ReactionsCreateForIssueParams = { + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + issue_number: number; + + owner: string; + + repo: string; + }; + export type ReactionsCreateForIssueCommentParams = { + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + + repo: string; + }; + export type ReactionsCreateForPullRequestReviewCommentParams = { + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the pull request review comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + + repo: string; + }; + export type ReactionsCreateForTeamDiscussionParams = { + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + team_id: number; + }; + export type ReactionsCreateForTeamDiscussionCommentParams = { + comment_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + team_id: number; + }; + export type ReactionsCreateForTeamDiscussionCommentInOrgParams = { + comment_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + org: string; + + team_slug: string; + }; + export type ReactionsCreateForTeamDiscussionCommentLegacyParams = { + comment_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + team_id: number; + }; + export type ReactionsCreateForTeamDiscussionInOrgParams = { + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + org: string; + + team_slug: string; + }; + export type ReactionsCreateForTeamDiscussionLegacyParams = { + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + team_id: number; + }; + export type ReactionsDeleteParams = { + reaction_id: number; + }; + export type ReactionsListForCommitCommentParams = { + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a commit comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReactionsListForIssueParamsDeprecatedNumber = { + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReactionsListForIssueParams = { + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + issue_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReactionsListForIssueCommentParams = { + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReactionsListForPullRequestReviewCommentParams = { + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/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"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReactionsListForTeamDiscussionParams = { + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type ReactionsListForTeamDiscussionCommentParams = { + comment_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type ReactionsListForTeamDiscussionCommentInOrgParams = { + comment_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_slug: string; + }; + export type ReactionsListForTeamDiscussionCommentLegacyParams = { + comment_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type ReactionsListForTeamDiscussionInOrgParams = { + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_slug: string; + }; + export type ReactionsListForTeamDiscussionLegacyParams = { + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type ReposAcceptInvitationParams = { + invitation_id: number; + }; + export type ReposAddCollaboratorParams = { + owner: string; + /** + * The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: + * \* `pull` - can pull, but not push to or administer this repository. + * \* `push` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push and administer this repository. + */ + permission?: "pull" | "push" | "admin"; + + repo: string; + + username: string; + }; + export type ReposAddDeployKeyParams = { + /** + * The contents of the key. + */ + key: string; + + owner: string; + /** + * 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://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + + repo: string; + /** + * A name for the key. + */ + title?: string; + }; + export type ReposAddProtectedBranchAdminEnforcementParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposAddProtectedBranchAppRestrictionsParams = { + apps: string[]; + + branch: string; + + owner: string; + + repo: string; + }; + export type ReposAddProtectedBranchRequiredSignaturesParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposAddProtectedBranchRequiredStatusChecksContextsParams = { + branch: string; + + contexts: string[]; + + owner: string; + + repo: string; + }; + export type ReposAddProtectedBranchTeamRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + teams: string[]; + }; + export type ReposAddProtectedBranchUserRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + users: string[]; + }; + export type ReposCheckCollaboratorParams = { + owner: string; + + repo: string; + + username: string; + }; + export type ReposCheckVulnerabilityAlertsParams = { + owner: string; + + repo: string; + }; + export type ReposCompareCommitsParams = { + base: string; + + head: string; + + owner: string; + + repo: string; + }; + export type ReposCreateCommitCommentParamsDeprecatedSha = { + /** + * The contents of the comment. + */ + body: string; + + owner: string; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; + + repo: string; + /** + * @deprecated "sha" parameter renamed to "commit_sha" + */ + sha: string; + }; + export type ReposCreateCommitCommentParamsDeprecatedLine = { + /** + * The contents of the comment. + */ + body: string; + + commit_sha: string; + /** + * **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. + * @deprecated "line" parameter has been deprecated and will be removed in future + */ + line?: number; + + owner: string; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; + + repo: string; + }; + export type ReposCreateCommitCommentParams = { + /** + * The contents of the comment. + */ + body: string; + + commit_sha: string; + + owner: string; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; + + repo: string; + }; + export type ReposCreateDeploymentParams = { + /** + * Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + */ + auto_merge?: boolean; + /** + * Short description of the deployment. + */ + description?: string; + /** + * Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + */ + environment?: string; + + owner: string; + /** + * JSON payload with extra information about the deployment. + */ + payload?: string; + /** + * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + production_environment?: boolean; + /** + * The ref to deploy. This can be a branch, tag, or SHA. + */ + ref: string; + + repo: string; + /** + * The [status](https://developer.github.com/v3/repos/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[]; + /** + * Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; + /** + * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + transient_environment?: boolean; + }; + export type ReposCreateDeploymentStatusParams = { + /** + * 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` + * **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + auto_inactive?: boolean; + + deployment_id: number; + /** + * A short description of the status. The maximum description length is 140 characters. + */ + description?: string; + /** + * Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + environment?: "production" | "staging" | "qa"; + /** + * Sets the URL for accessing your environment. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + environment_url?: string; + /** + * 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: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + log_url?: string; + + owner: string; + + repo: string; + /** + * The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * 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`. + */ + target_url?: string; + }; + export type ReposCreateDispatchEventParams = { + /** + * JSON payload with extra information about the webhook event that your action or worklow may use. + */ + client_payload?: ReposCreateDispatchEventParamsClientPayload; + /** + * **Required:** A custom webhook event name. + */ + event_type?: string; + + owner: string; + + repo: string; + }; + export type ReposCreateFileParams = { + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposCreateFileParamsAuthor; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposCreateFileParamsCommitter; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * The commit message. + */ + message: string; + + owner: string; + + path: string; + + repo: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + }; + export type ReposCreateForAuthenticatedUserParams = { + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Pass `true` to create an initial commit with empty README. + */ + auto_init?: boolean; + /** + * Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + */ + delete_branch_on_merge?: boolean; + /** + * A short description of the repository. + */ + description?: string; + /** + * 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; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * 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. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.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; + /** + * The name of the repository. + */ + name: string; + /** + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + */ + private?: boolean; + /** + * 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; + /** + * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `visibility` can also be `internal`. For more information, see "[Creating an internal repository](https://help.github.com/github/creating-cloning-and-archiving-repositories/creating-an-internal-repository)" in the GitHub Help documentation. + * The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header. + */ + visibility?: "public" | "private" | "visibility" | "internal"; + }; + export type ReposCreateForkParams = { + /** + * Optional parameter to specify the organization name if forking into an organization. + */ + organization?: string; + + owner: string; + + repo: string; + }; + export type ReposCreateHookParams = { + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + */ + config: ReposCreateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. + */ + name?: string; + + owner: string; + + repo: string; + }; + export type ReposCreateInOrgParams = { + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Pass `true` to create an initial commit with empty README. + */ + auto_init?: boolean; + /** + * Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + */ + delete_branch_on_merge?: boolean; + /** + * A short description of the repository. + */ + description?: string; + /** + * 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; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * 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. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.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; + /** + * The name of the repository. + */ + name: string; + + org: string; + /** + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + */ + private?: boolean; + /** + * 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; + /** + * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `visibility` can also be `internal`. For more information, see "[Creating an internal repository](https://help.github.com/github/creating-cloning-and-archiving-repositories/creating-an-internal-repository)" in the GitHub Help documentation. + * The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header. + */ + visibility?: "public" | "private" | "visibility" | "internal"; + }; + export type ReposCreateOrUpdateFileParams = { + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposCreateOrUpdateFileParamsAuthor; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposCreateOrUpdateFileParamsCommitter; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * The commit message. + */ + message: string; + + owner: string; + + path: string; + + repo: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + }; + export type ReposCreateReleaseParams = { + /** + * Text describing the contents of the tag. + */ + body?: string; + /** + * `true` to create a draft (unpublished) release, `false` to create a published one. + */ + draft?: boolean; + /** + * The name of the release. + */ + name?: string; + + owner: string; + /** + * `true` to identify the release as a prerelease. `false` to identify the release as a full release. + */ + prerelease?: boolean; + + repo: string; + /** + * The name of the tag. + */ + tag_name: string; + /** + * 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; + }; + export type ReposCreateStatusParams = { + /** + * A string label to differentiate this status from the status of other systems. + */ + context?: string; + /** + * A short description of the status. + */ + description?: string; + + owner: string; + + repo: string; + + sha: string; + /** + * The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. + */ + state: "error" | "failure" | "pending" | "success"; + /** + * 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; + }; + export type ReposCreateUsingTemplateParams = { + /** + * A short description of the new repository. + */ + description?: string; + /** + * The name of the new repository. + */ + name: string; + /** + * 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; + /** + * Either `true` to create a new private repository or `false` to create a new public one. + */ + private?: boolean; + + template_owner: string; + + template_repo: string; + }; + export type ReposDeclineInvitationParams = { + invitation_id: number; + }; + export type ReposDeleteParams = { + owner: string; + + repo: string; + }; + export type ReposDeleteCommitCommentParams = { + comment_id: number; + + owner: string; + + repo: string; + }; + export type ReposDeleteDownloadParams = { + download_id: number; + + owner: string; + + repo: string; + }; + export type ReposDeleteFileParams = { + /** + * object containing information about the author. + */ + author?: ReposDeleteFileParamsAuthor; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * object containing information about the committer. + */ + committer?: ReposDeleteFileParamsCommitter; + /** + * The commit message. + */ + message: string; + + owner: string; + + path: string; + + repo: string; + /** + * The blob SHA of the file being replaced. + */ + sha: string; + }; + export type ReposDeleteHookParams = { + hook_id: number; + + owner: string; + + repo: string; + }; + export type ReposDeleteInvitationParams = { + invitation_id: number; + + owner: string; + + repo: string; + }; + export type ReposDeleteReleaseParams = { + owner: string; + + release_id: number; + + repo: string; + }; + export type ReposDeleteReleaseAssetParams = { + asset_id: number; + + owner: string; + + repo: string; + }; + export type ReposDisableAutomatedSecurityFixesParams = { + owner: string; + + repo: string; + }; + export type ReposDisablePagesSiteParams = { + owner: string; + + repo: string; + }; + export type ReposDisableVulnerabilityAlertsParams = { + owner: string; + + repo: string; + }; + export type ReposEnableAutomatedSecurityFixesParams = { + owner: string; + + repo: string; + }; + export type ReposEnablePagesSiteParams = { + owner: string; + + repo: string; + + source?: ReposEnablePagesSiteParamsSource; + }; + export type ReposEnableVulnerabilityAlertsParams = { + owner: string; + + repo: string; + }; + export type ReposGetParams = { + owner: string; + + repo: string; + }; + export type ReposGetAppsWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetArchiveLinkParams = { + archive_format: string; + + owner: string; + + ref: string; + + repo: string; + }; + export type ReposGetBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetBranchProtectionParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetClonesParams = { + owner: string; + /** + * Must be one of: `day`, `week`. + */ + per?: "day" | "week"; + + repo: string; + }; + export type ReposGetCodeFrequencyStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetCollaboratorPermissionLevelParams = { + owner: string; + + repo: string; + + username: string; + }; + export type ReposGetCombinedStatusForRefParams = { + owner: string; + + ref: string; + + repo: string; + }; + export type ReposGetCommitParamsDeprecatedSha = { + owner: string; + + repo: string; + /** + * @deprecated "sha" parameter renamed to "ref" + */ + sha: string; + }; + export type ReposGetCommitParamsDeprecatedCommitSha = { + /** + * @deprecated "commit_sha" parameter renamed to "ref" + */ + commit_sha: string; + + owner: string; + + repo: string; + }; + export type ReposGetCommitParams = { + owner: string; + + ref: string; + + repo: string; + }; + export type ReposGetCommitActivityStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetCommitCommentParams = { + comment_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetCommitRefShaParams = { + owner: string; + + ref: string; + + repo: string; + }; + export type ReposGetContentsParams = { + owner: string; + + path: string; + /** + * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) + */ + ref?: string; + + repo: string; + }; + export type ReposGetContributorsStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetDeployKeyParams = { + key_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetDeploymentParams = { + deployment_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetDeploymentStatusParams = { + deployment_id: number; + + owner: string; + + repo: string; + + status_id: number; + }; + export type ReposGetDownloadParams = { + download_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetHookParams = { + hook_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetLatestPagesBuildParams = { + owner: string; + + repo: string; + }; + export type ReposGetLatestReleaseParams = { + owner: string; + + repo: string; + }; + export type ReposGetPagesParams = { + owner: string; + + repo: string; + }; + export type ReposGetPagesBuildParams = { + build_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetParticipationStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetProtectedBranchAdminEnforcementParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetProtectedBranchPullRequestReviewEnforcementParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetProtectedBranchRequiredSignaturesParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetProtectedBranchRequiredStatusChecksParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetProtectedBranchRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetPunchCardStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetReadmeParams = { + owner: string; + /** + * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) + */ + ref?: string; + + repo: string; + }; + export type ReposGetReleaseParams = { + owner: string; + + release_id: number; + + repo: string; + }; + export type ReposGetReleaseAssetParams = { + asset_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetReleaseByTagParams = { + owner: string; + + repo: string; + + tag: string; + }; + export type ReposGetTeamsWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetTopPathsParams = { + owner: string; + + repo: string; + }; + export type ReposGetTopReferrersParams = { + owner: string; + + repo: string; + }; + export type ReposGetUsersWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetViewsParams = { + owner: string; + /** + * Must be one of: `day`, `week`. + */ + per?: "day" | "week"; + + repo: string; + }; + export type ReposListParams = { + /** + * 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; + /** + * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` + * + * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. + */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** + * Can be one of `all`, `public`, or `private`. + */ + visibility?: "all" | "public" | "private"; + }; + export type ReposListAppsWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposListAssetsForReleaseParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + release_id: number; + + repo: string; + }; + export type ReposListBranchesParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. + */ + protected?: boolean; + + repo: string; + }; + export type ReposListBranchesForHeadCommitParams = { + commit_sha: string; + + owner: string; + + repo: string; + }; + export type ReposListCollaboratorsParams = { + /** + * Filter collaborators returned by their affiliation. Can be one of: + * \* `outside`: All outside collaborators of an organization-owned repository. + * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListCommentsForCommitParamsDeprecatedRef = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * @deprecated "ref" parameter renamed to "commit_sha" + */ + ref: string; + + repo: string; + }; + export type ReposListCommentsForCommitParams = { + commit_sha: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListCommitCommentsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListCommitsParams = { + /** + * GitHub login or email address by which to filter by commit author. + */ + author?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Only commits containing this file path will be returned. + */ + path?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). + */ + sha?: string; + /** + * Only commits after 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`. + */ + since?: string; + /** + * 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; + }; + export type ReposListContributorsParams = { + /** + * Set to `1` or `true` to include anonymous contributors in results. + */ + anon?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListDeployKeysParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListDeploymentStatusesParams = { + deployment_id: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListDeploymentsParams = { + /** + * The name of the environment that was deployed to (e.g., `staging` or `production`). + */ + environment?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The name of the ref. This can be a branch, tag, or SHA. + */ + ref?: string; + + repo: string; + /** + * The SHA recorded at creation time. + */ + sha?: string; + /** + * The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; + }; + export type ReposListDownloadsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListForOrgParams = { + /** + * Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` + */ + direction?: "asc" | "desc"; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `type` can also be `internal`. + */ + type?: + | "all" + | "public" + | "private" + | "forks" + | "sources" + | "member" + | "internal"; + }; + export type ReposListForUserParams = { + /** + * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `all`, `owner`, `member`. + */ + type?: "all" | "owner" | "member"; + + username: string; + }; + export type ReposListForksParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * The sort order. Can be either `newest`, `oldest`, or `stargazers`. + */ + sort?: "newest" | "oldest" | "stargazers"; + }; + export type ReposListHooksParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListInvitationsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListInvitationsForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type ReposListLanguagesParams = { + owner: string; + + repo: string; + }; + export type ReposListPagesBuildsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListProtectedBranchRequiredStatusChecksContextsParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposListProtectedBranchTeamRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposListProtectedBranchUserRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposListPublicParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The integer ID of the last Repository that you've seen. + */ + since?: string; + }; + export type ReposListPullRequestsAssociatedWithCommitParams = { + commit_sha: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListReleasesParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListStatusesForRefParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + ref: string; + + repo: string; + }; + export type ReposListTagsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListTeamsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListTeamsWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposListTopicsParams = { + owner: string; + + repo: string; + }; + export type ReposListUsersWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposMergeParams = { + /** + * The name of the base branch that the head will be merged into. + */ + base: string; + /** + * Commit message to use for the merge commit. If omitted, a default message will be used. + */ + commit_message?: string; + /** + * The head to merge. This can be a branch name or a commit SHA1. + */ + head: string; + + owner: string; + + repo: string; + }; + export type ReposPingHookParams = { + hook_id: number; + + owner: string; + + repo: string; + }; + export type ReposRemoveBranchProtectionParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveCollaboratorParams = { + owner: string; + + repo: string; + + username: string; + }; + export type ReposRemoveDeployKeyParams = { + key_id: number; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchAdminEnforcementParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchAppRestrictionsParams = { + apps: string[]; + + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchPullRequestReviewEnforcementParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchRequiredSignaturesParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchRequiredStatusChecksParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchRequiredStatusChecksContextsParams = { + branch: string; + + contexts: string[]; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchTeamRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + teams: string[]; + }; + export type ReposRemoveProtectedBranchUserRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + users: string[]; + }; + export type ReposReplaceProtectedBranchAppRestrictionsParams = { + apps: string[]; + + branch: string; + + owner: string; + + repo: string; + }; + export type ReposReplaceProtectedBranchRequiredStatusChecksContextsParams = { + branch: string; + + contexts: string[]; + + owner: string; + + repo: string; + }; + export type ReposReplaceProtectedBranchTeamRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + teams: string[]; + }; + export type ReposReplaceProtectedBranchUserRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + users: string[]; + }; + export type ReposReplaceTopicsParams = { + /** + * 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[]; + + owner: string; + + repo: string; + }; + export type ReposRequestPageBuildParams = { + owner: string; + + repo: string; + }; + export type ReposRetrieveCommunityProfileMetricsParams = { + owner: string; + + repo: string; + }; + export type ReposTestPushHookParams = { + hook_id: number; + + owner: string; + + repo: string; + }; + export type ReposTransferParams = { + /** + * **Required:** The username or organization name the repository will be transferred to. + */ + new_owner?: string; + + owner: string; + + repo: string; + /** + * ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + */ + team_ids?: number[]; + }; + export type ReposUpdateParams = { + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + */ + archived?: boolean; + /** + * Updates the default branch for this repository. + */ + default_branch?: string; + /** + * Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + */ + delete_branch_on_merge?: boolean; + /** + * A short description of the repository. + */ + description?: string; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * 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. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * The name of the repository. + */ + name?: string; + + owner: string; + /** + * Either `true` to make the repository private or `false` to make it public. Creating private repositories requires a paid GitHub account. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.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://help.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. + */ + private?: boolean; + + repo: string; + /** + * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `visibility` can also be `internal`. The `visibility` parameter overrides the `private` parameter when you use both along with the `nebula-preview` preview header. + */ + visibility?: "public" | "private" | "visibility" | "internal"; + }; + export type ReposUpdateBranchProtectionParams = { + /** + * 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://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. + */ + allow_deletions?: boolean; + /** + * 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://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." + */ + allow_force_pushes?: boolean | null; + + branch: string; + /** + * 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; + + owner: string; + + repo: string; + /** + * 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://help.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. + */ + required_linear_history?: boolean; + /** + * Require at least one approving review on a pull request, before merging. Set to `null` to disable. + */ + required_pull_request_reviews: ReposUpdateBranchProtectionParamsRequiredPullRequestReviews | null; + /** + * Require status checks to pass before merging. Set to `null` to disable. + */ + required_status_checks: ReposUpdateBranchProtectionParamsRequiredStatusChecks | null; + /** + * 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: ReposUpdateBranchProtectionParamsRestrictions | null; + }; + export type ReposUpdateCommitCommentParams = { + /** + * The contents of the comment + */ + body: string; + + comment_id: number; + + owner: string; + + repo: string; + }; + export type ReposUpdateFileParams = { + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposUpdateFileParamsAuthor; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposUpdateFileParamsCommitter; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * The commit message. + */ + message: string; + + owner: string; + + path: string; + + repo: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + }; + export type ReposUpdateHookParams = { + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + /** + * Determines a list of events to be added to the list of events that the Hook triggers for. + */ + add_events?: string[]; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + */ + config?: ReposUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. This replaces the entire array of events. + */ + events?: string[]; + + hook_id: number; + + owner: string; + /** + * Determines a list of events to be removed from the list of events that the Hook triggers for. + */ + remove_events?: string[]; + + repo: string; + }; + export type ReposUpdateInformationAboutPagesSiteParams = { + /** + * 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://help.github.com/articles/using-a-custom-domain-with-github-pages/)." + */ + cname?: string; + + owner: string; + + repo: string; + /** + * Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master /docs"`. + */ + source?: '"gh-pages"' | '"master"' | '"master /docs"'; + }; + export type ReposUpdateInvitationParams = { + invitation_id: number; + + owner: string; + /** + * The permissions that the associated user will have on the repository. Valid values are `read`, `write`, and `admin`. + */ + permissions?: "read" | "write" | "admin"; + + repo: string; + }; + export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParams = { + branch: string; + /** + * Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. + */ + dismiss_stale_reviews?: boolean; + /** + * Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. + */ + dismissal_restrictions?: ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions; + + owner: string; + + repo: string; + /** + * Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. + */ + require_code_owner_reviews?: boolean; + /** + * Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. + */ + required_approving_review_count?: number; + }; + export type ReposUpdateProtectedBranchRequiredStatusChecksParams = { + branch: string; + /** + * The list of status checks to require in order to merge into this branch + */ + contexts?: string[]; + + owner: string; + + repo: string; + /** + * Require branches to be up to date before merging. + */ + strict?: boolean; + }; + export type ReposUpdateReleaseParams = { + /** + * Text describing the contents of the tag. + */ + body?: string; + /** + * `true` makes the release a draft, and `false` publishes the release. + */ + draft?: boolean; + /** + * The name of the release. + */ + name?: string; + + owner: string; + /** + * `true` to identify the release as a prerelease, `false` to identify the release as a full release. + */ + prerelease?: boolean; + + release_id: number; + + repo: string; + /** + * The name of the tag. + */ + tag_name?: string; + /** + * 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; + }; + export type ReposUpdateReleaseAssetParams = { + asset_id: number; + /** + * An alternate short description of the asset. Used in place of the filename. + */ + label?: string; + /** + * The file name of the asset. + */ + name?: string; + + owner: string; + + repo: string; + }; + export type ReposUploadReleaseAssetParams = { + file: string | object; + + headers: ReposUploadReleaseAssetParamsHeaders; + /** + * An alternate short description of the asset. Used in place of the filename. This should be set in a URI query parameter. + */ + label?: string; + /** + * The file name of the asset. This should be set in a URI query parameter. + */ + name: string; + /** + * The `upload_url` key returned from creating or getting a release + */ + url: string; + }; + export type SearchCodeParams = { + /** + * 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"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching code](https://help.github.com/articles/searching-code/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "indexed"; + }; + export type SearchCommitsParams = { + /** + * 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"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching commits](https://help.github.com/articles/searching-commits/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "author-date" | "committer-date"; + }; + export type SearchEmailLegacyParams = { + /** + * The email address. + */ + email: string; + }; + export type SearchIssuesParams = { + /** + * 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"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; + }; + export type SearchIssuesAndPullRequestsParams = { + /** + * 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"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; + }; + export type SearchIssuesLegacyParams = { + /** + * The search term. + */ + keyword: string; + + owner: string; + + repository: string; + /** + * Indicates the state of the issues to return. Can be either `open` or `closed`. + */ + state: "open" | "closed"; + }; + export type SearchLabelsParams = { + /** + * 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"; + /** + * 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://developer.github.com/v3/search/#constructing-a-search-query). + */ + q: string; + /** + * The id of the repository. + */ + repository_id: number; + /** + * Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "created" | "updated"; + }; + export type SearchReposParams = { + /** + * 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"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching for repositories](https://help.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://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; + }; + export type SearchReposLegacyParams = { + /** + * The search term. + */ + keyword: string; + /** + * Filter results by language. + */ + language?: string; + /** + * The sort field. if `sort` param is provided. Can be either `asc` or `desc`. + */ + order?: "asc" | "desc"; + /** + * The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match. + */ + sort?: "stars" | "forks" | "updated"; + /** + * The page number to fetch. + */ + start_page?: string; + }; + export type SearchTopicsParams = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). + */ + q: string; + }; + export type SearchUsersParams = { + /** + * 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"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching users](https://help.github.com/articles/searching-users/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "followers" | "repositories" | "joined"; + }; + export type SearchUsersLegacyParams = { + /** + * The search term. + */ + keyword: string; + /** + * The sort field. if `sort` param is provided. Can be either `asc` or `desc`. + */ + order?: "asc" | "desc"; + /** + * The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match. + */ + sort?: "stars" | "forks" | "updated"; + /** + * The page number to fetch. + */ + start_page?: string; + }; + export type TeamsAddMemberParams = { + team_id: number; + + username: string; + }; + export type TeamsAddMemberLegacyParams = { + team_id: number; + + username: string; + }; + export type TeamsAddOrUpdateMembershipParams = { + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; + + team_id: number; + + username: string; + }; + export type TeamsAddOrUpdateMembershipInOrgParams = { + org: string; + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; + + team_slug: string; + + username: string; + }; + export type TeamsAddOrUpdateMembershipLegacyParams = { + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; + + team_id: number; + + username: string; + }; + export type TeamsAddOrUpdateProjectParams = { + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + permission?: "read" | "write" | "admin"; + + project_id: number; + + team_id: number; + }; + export type TeamsAddOrUpdateProjectInOrgParams = { + org: string; + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + permission?: "read" | "write" | "admin"; + + project_id: number; + + team_slug: string; + }; + export type TeamsAddOrUpdateProjectLegacyParams = { + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + permission?: "read" | "write" | "admin"; + + project_id: number; + + team_id: number; + }; + export type TeamsAddOrUpdateRepoParams = { + owner: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + */ + permission?: "pull" | "push" | "admin"; + + repo: string; + + team_id: number; + }; + export type TeamsAddOrUpdateRepoInOrgParams = { + org: string; + + owner: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + */ + permission?: "pull" | "push" | "admin"; + + repo: string; + + team_slug: string; + }; + export type TeamsAddOrUpdateRepoLegacyParams = { + owner: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + */ + permission?: "pull" | "push" | "admin"; + + repo: string; + + team_id: number; + }; + export type TeamsCheckManagesRepoParams = { + owner: string; + + repo: string; + + team_id: number; + }; + export type TeamsCheckManagesRepoInOrgParams = { + org: string; + + owner: string; + + repo: string; + + team_slug: string; + }; + export type TeamsCheckManagesRepoLegacyParams = { + owner: string; + + repo: string; + + team_id: number; + }; + export type TeamsCreateParamsDeprecatedPermission = { + /** + * The description of the team. + */ + description?: string; + /** + * List GitHub IDs for organization members who will become team maintainers. + */ + maintainers?: string[]; + /** + * The name of the team. + */ + name: string; + + org: string; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + * @deprecated "permission" parameter has been deprecated and will be removed in future + */ + permission?: string; + /** + * 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` + */ + privacy?: "secret" | "closed"; + /** + * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. + */ + repo_names?: string[]; + }; + export type TeamsCreateParams = { + /** + * The description of the team. + */ + description?: string; + /** + * List GitHub IDs for organization members who will become team maintainers. + */ + maintainers?: string[]; + /** + * The name of the team. + */ + name: string; + + org: string; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; + /** + * 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` + */ + privacy?: "secret" | "closed"; + /** + * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. + */ + repo_names?: string[]; + }; + export type TeamsCreateDiscussionParams = { + /** + * The discussion post's body text. + */ + body: string; + /** + * 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. + */ + private?: boolean; + + team_id: number; + /** + * The discussion post's title. + */ + title: string; + }; + export type TeamsCreateDiscussionCommentParams = { + /** + * The discussion comment's body text. + */ + body: string; + + discussion_number: number; + + team_id: number; + }; + export type TeamsCreateDiscussionCommentInOrgParams = { + /** + * The discussion comment's body text. + */ + body: string; + + discussion_number: number; + + org: string; + + team_slug: string; + }; + export type TeamsCreateDiscussionCommentLegacyParams = { + /** + * The discussion comment's body text. + */ + body: string; + + discussion_number: number; + + team_id: number; + }; + export type TeamsCreateDiscussionInOrgParams = { + /** + * The discussion post's body text. + */ + body: string; + + org: string; + /** + * 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. + */ + private?: boolean; + + team_slug: string; + /** + * The discussion post's title. + */ + title: string; + }; + export type TeamsCreateDiscussionLegacyParams = { + /** + * The discussion post's body text. + */ + body: string; + /** + * 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. + */ + private?: boolean; + + team_id: number; + /** + * The discussion post's title. + */ + title: string; + }; + export type TeamsDeleteParams = { + team_id: number; + }; + export type TeamsDeleteDiscussionParams = { + discussion_number: number; + + team_id: number; + }; + export type TeamsDeleteDiscussionCommentParams = { + comment_number: number; + + discussion_number: number; + + team_id: number; + }; + export type TeamsDeleteDiscussionCommentInOrgParams = { + comment_number: number; + + discussion_number: number; + + org: string; + + team_slug: string; + }; + export type TeamsDeleteDiscussionCommentLegacyParams = { + comment_number: number; + + discussion_number: number; + + team_id: number; + }; + export type TeamsDeleteDiscussionInOrgParams = { + discussion_number: number; + + org: string; + + team_slug: string; + }; + export type TeamsDeleteDiscussionLegacyParams = { + discussion_number: number; + + team_id: number; + }; + export type TeamsDeleteInOrgParams = { + org: string; + + team_slug: string; + }; + export type TeamsDeleteLegacyParams = { + team_id: number; + }; + export type TeamsGetParams = { + team_id: number; + }; + export type TeamsGetByNameParams = { + org: string; + + team_slug: string; + }; + export type TeamsGetDiscussionParams = { + discussion_number: number; + + team_id: number; + }; + export type TeamsGetDiscussionCommentParams = { + comment_number: number; + + discussion_number: number; + + team_id: number; + }; + export type TeamsGetDiscussionCommentInOrgParams = { + comment_number: number; + + discussion_number: number; + + org: string; + + team_slug: string; + }; + export type TeamsGetDiscussionCommentLegacyParams = { + comment_number: number; + + discussion_number: number; + + team_id: number; + }; + export type TeamsGetDiscussionInOrgParams = { + discussion_number: number; + + org: string; + + team_slug: string; + }; + export type TeamsGetDiscussionLegacyParams = { + discussion_number: number; + + team_id: number; + }; + export type TeamsGetLegacyParams = { + team_id: number; + }; + export type TeamsGetMemberParams = { + team_id: number; + + username: string; + }; + export type TeamsGetMemberLegacyParams = { + team_id: number; + + username: string; + }; + export type TeamsGetMembershipParams = { + team_id: number; + + username: string; + }; + export type TeamsGetMembershipInOrgParams = { + org: string; + + team_slug: string; + + username: string; + }; + export type TeamsGetMembershipLegacyParams = { + team_id: number; + + username: string; + }; + export type TeamsListParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type TeamsListChildParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListChildInOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_slug: string; + }; + export type TeamsListChildLegacyParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListDiscussionCommentsParams = { + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + + discussion_number: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListDiscussionCommentsInOrgParams = { + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + + discussion_number: number; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_slug: string; + }; + export type TeamsListDiscussionCommentsLegacyParams = { + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + + discussion_number: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListDiscussionsParams = { + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListDiscussionsInOrgParams = { + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_slug: string; + }; + export type TeamsListDiscussionsLegacyParams = { + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type TeamsListMembersParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: "member" | "maintainer" | "all"; + + team_id: number; + }; + export type TeamsListMembersInOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: "member" | "maintainer" | "all"; + + team_slug: string; + }; + export type TeamsListMembersLegacyParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: "member" | "maintainer" | "all"; + + team_id: number; + }; + export type TeamsListPendingInvitationsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListPendingInvitationsInOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_slug: string; + }; + export type TeamsListPendingInvitationsLegacyParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListProjectsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListProjectsInOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_slug: string; + }; + export type TeamsListProjectsLegacyParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListReposParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListReposInOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_slug: string; + }; + export type TeamsListReposLegacyParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsRemoveMemberParams = { + team_id: number; + + username: string; + }; + export type TeamsRemoveMemberLegacyParams = { + team_id: number; + + username: string; + }; + export type TeamsRemoveMembershipParams = { + team_id: number; + + username: string; + }; + export type TeamsRemoveMembershipInOrgParams = { + org: string; + + team_slug: string; + + username: string; + }; + export type TeamsRemoveMembershipLegacyParams = { + team_id: number; + + username: string; + }; + export type TeamsRemoveProjectParams = { + project_id: number; + + team_id: number; + }; + export type TeamsRemoveProjectInOrgParams = { + org: string; + + project_id: number; + + team_slug: string; + }; + export type TeamsRemoveProjectLegacyParams = { + project_id: number; + + team_id: number; + }; + export type TeamsRemoveRepoParams = { + owner: string; + + repo: string; + + team_id: number; + }; + export type TeamsRemoveRepoInOrgParams = { + org: string; + + owner: string; + + repo: string; + + team_slug: string; + }; + export type TeamsRemoveRepoLegacyParams = { + owner: string; + + repo: string; + + team_id: number; + }; + export type TeamsReviewProjectParams = { + project_id: number; + + team_id: number; + }; + export type TeamsReviewProjectInOrgParams = { + org: string; + + project_id: number; + + team_slug: string; + }; + export type TeamsReviewProjectLegacyParams = { + project_id: number; + + team_id: number; + }; + export type TeamsUpdateParamsDeprecatedPermission = { + /** + * The description of the team. + */ + description?: string; + /** + * The name of the team. + */ + name: string; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + * @deprecated "permission" parameter has been deprecated and will be removed in future + */ + permission?: string; + /** + * 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. + */ + privacy?: "secret" | "closed"; + + team_id: number; + }; + export type TeamsUpdateParams = { + /** + * The description of the team. + */ + description?: string; + /** + * The name of the team. + */ + name: string; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; + /** + * 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. + */ + privacy?: "secret" | "closed"; + + team_id: number; + }; + export type TeamsUpdateDiscussionParams = { + /** + * The discussion post's body text. + */ + body?: string; + + discussion_number: number; + + team_id: number; + /** + * The discussion post's title. + */ + title?: string; + }; + export type TeamsUpdateDiscussionCommentParams = { + /** + * The discussion comment's body text. + */ + body: string; + + comment_number: number; + + discussion_number: number; + + team_id: number; + }; + export type TeamsUpdateDiscussionCommentInOrgParams = { + /** + * The discussion comment's body text. + */ + body: string; + + comment_number: number; + + discussion_number: number; + + org: string; + + team_slug: string; + }; + export type TeamsUpdateDiscussionCommentLegacyParams = { + /** + * The discussion comment's body text. + */ + body: string; + + comment_number: number; + + discussion_number: number; + + team_id: number; + }; + export type TeamsUpdateDiscussionInOrgParams = { + /** + * The discussion post's body text. + */ + body?: string; + + discussion_number: number; + + org: string; + + team_slug: string; + /** + * The discussion post's title. + */ + title?: string; + }; + export type TeamsUpdateDiscussionLegacyParams = { + /** + * The discussion post's body text. + */ + body?: string; + + discussion_number: number; + + team_id: number; + /** + * The discussion post's title. + */ + title?: string; + }; + export type TeamsUpdateInOrgParamsDeprecatedPermission = { + /** + * The description of the team. + */ + description?: string; + /** + * The name of the team. + */ + name: string; + + org: string; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + * @deprecated "permission" parameter has been deprecated and will be removed in future + */ + permission?: string; + /** + * 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. + */ + privacy?: "secret" | "closed"; + + team_slug: string; + }; + export type TeamsUpdateInOrgParams = { + /** + * The description of the team. + */ + description?: string; + /** + * The name of the team. + */ + name: string; + + org: string; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; + /** + * 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. + */ + privacy?: "secret" | "closed"; + + team_slug: string; + }; + export type TeamsUpdateLegacyParamsDeprecatedPermission = { + /** + * The description of the team. + */ + description?: string; + /** + * The name of the team. + */ + name: string; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + * @deprecated "permission" parameter has been deprecated and will be removed in future + */ + permission?: string; + /** + * 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. + */ + privacy?: "secret" | "closed"; + + team_id: number; + }; + export type TeamsUpdateLegacyParams = { + /** + * The description of the team. + */ + description?: string; + /** + * The name of the team. + */ + name: string; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; + /** + * 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. + */ + privacy?: "secret" | "closed"; + + team_id: number; + }; + export type UsersAddEmailsParams = { + /** + * Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + */ + emails: string[]; + }; + export type UsersBlockParams = { + username: string; + }; + export type UsersCheckBlockedParams = { + username: string; + }; + export type UsersCheckFollowingParams = { + username: string; + }; + export type UsersCheckFollowingForUserParams = { + target_user: string; + + username: string; + }; + export type UsersCreateGpgKeyParams = { + /** + * Your GPG key, generated in ASCII-armored format. See "[Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/)" for help creating a GPG key. + */ + armored_public_key?: string; + }; + export type UsersCreatePublicKeyParams = { + /** + * The public SSH key to add to your GitHub account. See "[Generating a new SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)" for guidance on how to create a public SSH key. + */ + key?: string; + /** + * A descriptive name for the new key. Use a name that will help you recognize this key in your GitHub account. For example, if you're using a personal Mac, you might call this key "Personal MacBook Air". + */ + title?: string; + }; + export type UsersDeleteEmailsParams = { + /** + * Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + */ + emails: string[]; + }; + export type UsersDeleteGpgKeyParams = { + gpg_key_id: number; + }; + export type UsersDeletePublicKeyParams = { + key_id: number; + }; + export type UsersFollowParams = { + username: string; + }; + export type UsersGetByUsernameParams = { + username: string; + }; + export type UsersGetContextForUserParams = { + /** + * Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. + */ + subject_id?: string; + /** + * 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"; + + username: string; + }; + export type UsersGetGpgKeyParams = { + gpg_key_id: number; + }; + export type UsersGetPublicKeyParams = { + key_id: number; + }; + export type UsersListParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The integer ID of the last User that you've seen. + */ + since?: string; + }; + export type UsersListEmailsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListFollowersForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListFollowersForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type UsersListFollowingForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListFollowingForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type UsersListGpgKeysParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListGpgKeysForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type UsersListPublicEmailsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListPublicKeysParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListPublicKeysForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type UsersTogglePrimaryEmailVisibilityParams = { + /** + * Specify the _primary_ email address that needs a visibility change. + */ + email: string; + /** + * Use `public` to enable an authenticated user to view the specified email address, or use `private` so this primary email address cannot be seen publicly. + */ + visibility: string; + }; + export type UsersUnblockParams = { + username: string; + }; + export type UsersUnfollowParams = { + username: string; + }; + export type UsersUpdateAuthenticatedParams = { + /** + * The new short biography of the user. + */ + bio?: string; + /** + * The new blog URL of the user. + */ + blog?: string; + /** + * The new company of the user. + */ + company?: string; + /** + * The publicly visible email address of the user. + */ + email?: string; + /** + * The new hiring availability of the user. + */ + hireable?: boolean; + /** + * The new location of the user. + */ + location?: string; + /** + * The new name of the user. + */ + name?: string; + }; + + // child param types + export type AppsCreateInstallationTokenParamsPermissions = {}; + export type ChecksCreateParamsActions = { + description: string; + identifier: string; + label: string; + }; + export type ChecksCreateParamsOutput = { + annotations?: ChecksCreateParamsOutputAnnotations[]; + images?: ChecksCreateParamsOutputImages[]; + summary: string; + text?: string; + title: string; + }; + export type ChecksCreateParamsOutputAnnotations = { + annotation_level: "notice" | "warning" | "failure"; + end_column?: number; + end_line: number; + message: string; + path: string; + raw_details?: string; + start_column?: number; + start_line: number; + title?: string; + }; + export type ChecksCreateParamsOutputImages = { + alt: string; + caption?: string; + image_url: string; + }; + export type ChecksSetSuitesPreferencesParamsAutoTriggerChecks = { + app_id: number; + setting: boolean; + }; + export type ChecksUpdateParamsActions = { + description: string; + identifier: string; + label: string; + }; + export type ChecksUpdateParamsOutput = { + annotations?: ChecksUpdateParamsOutputAnnotations[]; + images?: ChecksUpdateParamsOutputImages[]; + summary: string; + text?: string; + title?: string; + }; + export type ChecksUpdateParamsOutputAnnotations = { + annotation_level: "notice" | "warning" | "failure"; + end_column?: number; + end_line: number; + message: string; + path: string; + raw_details?: string; + start_column?: number; + start_line: number; + title?: string; + }; + export type ChecksUpdateParamsOutputImages = { + alt: string; + caption?: string; + image_url: string; + }; + export type GistsCreateParamsFiles = { + content?: string; + }; + export type GistsUpdateParamsFiles = { + content?: string; + filename?: string; + }; + export type GitCreateCommitParamsAuthor = { + date?: string; + email?: string; + name?: string; + }; + export type GitCreateCommitParamsCommitter = { + date?: string; + email?: string; + name?: string; + }; + export type GitCreateTagParamsTagger = { + date?: string; + email?: string; + name?: string; + }; + export type GitCreateTreeParamsTree = { + content?: string; + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + path?: string; + sha?: string; + type?: "blob" | "tree" | "commit"; + }; + export type OrgsCreateHookParamsConfig = { + content_type?: string; + insecure_ssl?: string; + secret?: string; + url: string; + }; + export type OrgsUpdateHookParamsConfig = { + content_type?: string; + insecure_ssl?: string; + secret?: string; + url: string; + }; + export type PullsCreateReviewParamsComments = { + body: string; + path: string; + position: number; + }; + export type ReposCreateDispatchEventParamsClientPayload = {}; + export type ReposCreateFileParamsAuthor = { + email: string; + name: string; + }; + export type ReposCreateFileParamsCommitter = { + email: string; + name: string; + }; + export type ReposCreateHookParamsConfig = { + content_type?: string; + insecure_ssl?: string; + secret?: string; + url: string; + }; + export type ReposCreateOrUpdateFileParamsAuthor = { + email: string; + name: string; + }; + export type ReposCreateOrUpdateFileParamsCommitter = { + email: string; + name: string; + }; + export type ReposDeleteFileParamsAuthor = { + email?: string; + name?: string; + }; + export type ReposDeleteFileParamsCommitter = { + email?: string; + name?: string; + }; + export type ReposEnablePagesSiteParamsSource = { + branch?: "master" | "gh-pages"; + path?: string; + }; + export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviews = { + dismiss_stale_reviews?: boolean; + dismissal_restrictions?: ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + }; + export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions = { + teams?: string[]; + users?: string[]; + }; + export type ReposUpdateBranchProtectionParamsRequiredStatusChecks = { + contexts: string[]; + strict: boolean; + }; + export type ReposUpdateBranchProtectionParamsRestrictions = { + apps?: string[]; + teams: string[]; + users: string[]; + }; + export type ReposUpdateFileParamsAuthor = { + email: string; + name: string; + }; + export type ReposUpdateFileParamsCommitter = { + email: string; + name: string; + }; + export type ReposUpdateHookParamsConfig = { + content_type?: string; + insecure_ssl?: string; + secret?: string; + url: string; + }; + export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions = { + teams?: string[]; + users?: string[]; + }; + export type ReposUploadReleaseAssetParamsHeaders = { + "content-length": number; + "content-type": string; + }; +} + +declare class Octokit { + constructor(options?: Octokit.Options); + authenticate(auth: Octokit.AuthBasic): void; + authenticate(auth: Octokit.AuthOAuthToken): void; + authenticate(auth: Octokit.AuthOAuthSecret): void; + authenticate(auth: Octokit.AuthUserToken): void; + authenticate(auth: Octokit.AuthJWT): void; + + hook: { + before( + name: string, + callback: (options: Octokit.HookOptions) => void + ): void; + after( + name: string, + callback: ( + response: Octokit.Response, + options: Octokit.HookOptions + ) => void + ): void; + error( + name: string, + callback: (error: Octokit.HookError, options: Octokit.HookOptions) => void + ): void; + wrap( + name: string, + callback: ( + request: ( + options: Octokit.HookOptions + ) => Promise>, + options: Octokit.HookOptions + ) => void + ): void; + }; + + static plugin(plugin: Octokit.Plugin | Octokit.Plugin[]): Octokit.Static; + + registerEndpoints(endpoints: { + [scope: string]: Octokit.EndpointOptions; + }): void; + + request: Octokit.Request; + + paginate: Octokit.Paginate; + + log: Octokit.Log; + + activity: { + /** + * Requires for the user to be authenticated. + */ + checkStarringRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityCheckStarringRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Requires for the user to be authenticated. + */ + checkWatchingRepoLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityCheckWatchingRepoLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/activity/watching/#set-a-repository-subscription). + */ + deleteRepoSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityDeleteRepoSubscriptionParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Mutes all future notifications for a conversation until you comment on the thread or get **@mention**ed. + */ + deleteThreadSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityDeleteThreadSubscriptionParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + getRepoSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityGetRepoSubscriptionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getThread: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityGetThreadParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://developer.github.com/v3/activity/watching/#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + getThreadSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityGetThreadSubscriptionParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This is the user's organization dashboard. You must be authenticated as the user to view this. + */ + listEventsForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityListEventsForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + */ + listEventsForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListEventsForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/#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://developer.github.com/v3/#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + listFeeds: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all notifications for the current user, sorted by most recently updated. + * + * The following example uses the `since` parameter to list notifications that have been updated after the specified time. + */ + listNotifications: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListNotificationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all notifications for the current user. + */ + listNotificationsForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListNotificationsForRepoParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ActivityListPublicEventsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listPublicEventsForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListPublicEventsForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listPublicEventsForRepoNetwork: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListPublicEventsForRepoNetworkParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listPublicEventsForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListPublicEventsForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.ActivityListReceivedEventsForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listReceivedPublicEventsForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListReceivedPublicEventsForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listRepoEvents: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityListRepoEventsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listReposStarredByAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListReposStarredByAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.ActivityListReposStarredByAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listReposStarredByUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListReposStarredByUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listReposWatchedByUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListReposWatchedByUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listStargazersForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListStargazersForRepoParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listWatchedReposForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListWatchedReposForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.ActivityListWatchedReposForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + listWatchersForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListWatchersForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Marks a notification 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 your notifications](https://developer.github.com/v3/activity/notifications/#list-your-notifications) endpoint and pass the query parameter `all=false`. + */ + markAsRead: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityMarkAsReadParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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 your notifications in a repository](https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository) endpoint and pass the query parameter `all=false`. + */ + markNotificationsAsReadForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityMarkNotificationsAsReadForRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + markThreadAsRead: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityMarkThreadAsReadParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/activity/watching/#delete-a-repository-subscription) completely. + */ + setRepoSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivitySetRepoSubscriptionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This lets you subscribe or unsubscribe from a conversation. + */ + setThreadSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivitySetThreadSubscriptionParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Requires for the user to be 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://developer.github.com/v3/#http-verbs)." + */ + starRepo: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityStarRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Requires for the user to be authenticated. + */ + stopWatchingRepoLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityStopWatchingRepoLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Requires for the user to be authenticated. + */ + unstarRepo: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityUnstarRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Requires the user to be 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://developer.github.com/v3/#http-verbs)." + */ + watchRepoLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityWatchRepoLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + }; + 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://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. + */ + addRepoToInstallation: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsAddRepoToInstallationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.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://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + checkAccountIsAssociatedWithAny: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsCheckAccountIsAssociatedWithAnyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.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://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + checkAccountIsAssociatedWithAnyStubbed: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsCheckAccountIsAssociatedWithAnyStubbedParams + ): Promise< + Octokit.Response< + Octokit.AppsCheckAccountIsAssociatedWithAnyStubbedResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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://developer.github.com/v3/auth#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`. + * @deprecated octokit.apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization + */ + checkAuthorization: { + ( + params?: Octokit.RequestOptions & Octokit.AppsCheckAuthorizationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/auth#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?: Octokit.RequestOptions & Octokit.AppsCheckTokenParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://developer.github.com/v3/activity/events/types/#contentreferenceevent) to create an attachment. + * + * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://developer.github.com/apps/using-content-attachments/)" for details about content attachments. + * + * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * + * This example creates a content attachment for the domain `https://errors.ai/`. + */ + createContentAttachment: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsCreateContentAttachmentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://developer.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?: Octokit.RequestOptions & Octokit.AppsCreateFromManifestParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * This example grants the token "Read and write" permission to `issues` and "Read" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269. + */ + createInstallationToken: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsCreateInstallationTokenParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#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?: Octokit.RequestOptions & Octokit.AppsDeleteAuthorizationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + deleteInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsDeleteInstallationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + */ + deleteToken: { + ( + params?: Octokit.RequestOptions & Octokit.AppsDeleteTokenParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * @deprecated octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10) + */ + findOrgInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsFindOrgInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * @deprecated octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10) + */ + findRepoInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsFindRepoInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * @deprecated octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10) + */ + findUserInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsFindUserInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations](https://developer.github.com/v3/apps/#list-installations)" endpoint. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getAuthenticated: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **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://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + getBySlug: { + (params?: Octokit.RequestOptions & Octokit.AppsGetBySlugParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsGetInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getOrgInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsGetOrgInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getRepoInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsGetRepoInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getUserInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsGetUserInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns any accounts associated with a 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://developer.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://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsUserOrOrgOnPlan: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsListAccountsUserOrOrgOnPlanParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns any accounts associated with a 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://developer.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://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsUserOrOrgOnPlanStubbed: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsListAccountsUserOrOrgOnPlanStubbedParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.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?: Octokit.RequestOptions & + Octokit.AppsListInstallationReposForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.AppsListInstallationReposForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You must use a [JWT](https://developer.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?: Octokit.RequestOptions & Octokit.AppsListInstallationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.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?: Octokit.RequestOptions & + Octokit.AppsListInstallationsForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.AppsListInstallationsForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.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://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). + */ + listMarketplacePurchasesForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsListMarketplacePurchasesForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.AppsListMarketplacePurchasesForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.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://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). + */ + listMarketplacePurchasesForAuthenticatedUserStubbed: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams + ): Promise< + Octokit.Response< + Octokit.AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * GitHub Apps must use a [JWT](https://developer.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://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlans: { + (params?: Octokit.RequestOptions & Octokit.AppsListPlansParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * GitHub Apps must use a [JWT](https://developer.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://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlansStubbed: { + ( + params?: Octokit.RequestOptions & Octokit.AppsListPlansStubbedParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List repositories that an installation can access. + * + * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + listRepos: { + (params?: Octokit.RequestOptions & Octokit.AppsListReposParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. + */ + removeRepoFromInstallation: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsRemoveRepoFromInstallationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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://developer.github.com/v3/auth#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`. + * @deprecated octokit.apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization + */ + resetAuthorization: { + ( + params?: Octokit.RequestOptions & Octokit.AppsResetAuthorizationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/auth#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?: Octokit.RequestOptions & Octokit.AppsResetTokenParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + * @deprecated octokit.apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application + */ + revokeAuthorizationForApplication: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsRevokeAuthorizationForApplicationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#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 token as `:access_token` 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 Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). + * @deprecated octokit.apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application + */ + revokeGrantForApplication: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsRevokeGrantForApplicationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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 a new installation token](https://developer.github.com/v3/apps/#create-a-new-installation-token)" endpoint. + * + * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + revokeInstallationToken: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + }; + 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. + */ + create: { + (params?: Octokit.RequestOptions & Octokit.ChecksCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **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://developer.github.com/v3/checks/runs/). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Set preferences for check suites on a repository](https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + createSuite: { + ( + params?: Octokit.RequestOptions & Octokit.ChecksCreateSuiteParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **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?: Octokit.RequestOptions & Octokit.ChecksGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **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?: Octokit.RequestOptions & Octokit.ChecksGetSuiteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ChecksListAnnotationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **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?: Octokit.RequestOptions & Octokit.ChecksListForRefParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **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?: Octokit.RequestOptions & Octokit.ChecksListForSuiteParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **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?: Octokit.RequestOptions & Octokit.ChecksListSuitesForRefParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://developer.github.com/v3/activity/events/types/#checksuiteevent) 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?: Octokit.RequestOptions & Octokit.ChecksRerequestSuiteParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Changes the default automatic flow when creating check suites. By default, the CheckSuiteEvent 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://developer.github.com/v3/checks/suites/#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. + */ + setSuitesPreferences: { + ( + params?: Octokit.RequestOptions & + Octokit.ChecksSetSuitesPreferencesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **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?: Octokit.RequestOptions & Octokit.ChecksUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + codesOfConduct: { + getConductCode: { + ( + params?: Octokit.RequestOptions & + Octokit.CodesOfConductGetConductCodeParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This method returns the contents of the repository's code of conduct file, if one is detected. + */ + getForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.CodesOfConductGetForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listConductCodes: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + emojis: { + /** + * Lists all the emojis available to use on GitHub. + */ + get: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + }; + gists: { + checkIsStarred: { + ( + params?: Octokit.RequestOptions & Octokit.GistsCheckIsStarredParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.GistsCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + createComment: { + ( + params?: Octokit.RequestOptions & Octokit.GistsCreateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + delete: { + (params?: Octokit.RequestOptions & Octokit.GistsDeleteParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + deleteComment: { + ( + params?: Octokit.RequestOptions & Octokit.GistsDeleteCommentParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: This was previously `/gists/:gist_id/fork`. + */ + fork: { + (params?: Octokit.RequestOptions & Octokit.GistsForkParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + get: { + (params?: Octokit.RequestOptions & Octokit.GistsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getComment: { + ( + params?: Octokit.RequestOptions & Octokit.GistsGetCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getRevision: { + ( + params?: Octokit.RequestOptions & Octokit.GistsGetRevisionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + list: { + (params?: Octokit.RequestOptions & Octokit.GistsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listComments: { + ( + params?: Octokit.RequestOptions & Octokit.GistsListCommentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listCommits: { + ( + params?: Octokit.RequestOptions & Octokit.GistsListCommitsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listForks: { + (params?: Octokit.RequestOptions & Octokit.GistsListForksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://developer.github.com/v3/#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?: Octokit.RequestOptions & Octokit.GistsListPublicParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listPublicForUser: { + ( + params?: Octokit.RequestOptions & Octokit.GistsListPublicForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List the authenticated user's starred gists: + */ + listStarred: { + ( + params?: Octokit.RequestOptions & Octokit.GistsListStarredParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + star: { + (params?: Octokit.RequestOptions & Octokit.GistsStarParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + unstar: { + (params?: Octokit.RequestOptions & Octokit.GistsUnstarParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.GistsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateComment: { + ( + params?: Octokit.RequestOptions & Octokit.GistsUpdateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + git: { + createBlob: { + (params?: Octokit.RequestOptions & Octokit.GitCreateBlobParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * In this example, the payload of the signature would be: + * + * + * + * **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: + * + * 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?: Octokit.RequestOptions & Octokit.GitCreateCommitParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.GitCreateRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/git/refs/#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://developer.github.com/v3/git/refs/#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * 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?: Octokit.RequestOptions & Octokit.GitCreateTagParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/git/commits/#create-a-commit)" and "[Update a reference](https://developer.github.com/v3/git/refs/#update-a-reference)." + */ + createTree: { + (params?: Octokit.RequestOptions & Octokit.GitCreateTreeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * ``` + * DELETE /repos/octocat/Hello-World/git/refs/heads/feature-a + * ``` + * + * ``` + * DELETE /repos/octocat/Hello-World/git/refs/tags/v1.0 + * ``` + */ + deleteRef: { + (params?: Octokit.RequestOptions & Octokit.GitDeleteRefParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + getBlob: { + (params?: Octokit.RequestOptions & Octokit.GitGetBlobParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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: + * + * 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?: Octokit.RequestOptions & Octokit.GitGetCommitParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/pulls/#get-a-single-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://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". + * + * To get the reference for a branch named `skunkworkz/featureA`, the endpoint route is: + */ + getRef: { + (params?: Octokit.RequestOptions & Octokit.GitGetRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **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: + * + * 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?: Octokit.RequestOptions & Octokit.GitGetTagParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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, you can clone the repository and iterate over the Git data locally. + */ + getTree: { + (params?: Octokit.RequestOptions & Octokit.GitGetTreeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/pulls/#get-a-single-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://developer.github.com/v3/git/#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?: Octokit.RequestOptions & Octokit.GitListMatchingRefsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns 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`. If there are no references to list, a `404` is returned. + */ + listRefs: { + (params?: Octokit.RequestOptions & Octokit.GitListRefsParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + updateRef: { + (params?: Octokit.RequestOptions & Octokit.GitUpdateRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + gitignore: { + /** + * The API also allows fetching the source of a single template. + * + * Use the raw [media type](https://developer.github.com/v3/media/) to get the raw contents. + */ + getTemplate: { + ( + params?: Octokit.RequestOptions & Octokit.GitignoreGetTemplateParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all templates available to pass as an option when [creating a repository](https://developer.github.com/v3/repos/#create). + */ + listTemplates: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + interactions: { + /** + * Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions. + */ + addOrUpdateRestrictionsForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsAddOrUpdateRestrictionsForOrgParams + ): Promise< + Octokit.Response< + Octokit.InteractionsAddOrUpdateRestrictionsForOrgResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions. + */ + addOrUpdateRestrictionsForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsAddOrUpdateRestrictionsForRepoParams + ): Promise< + Octokit.Response< + Octokit.InteractionsAddOrUpdateRestrictionsForRepoResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + getRestrictionsForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsGetRestrictionsForOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + getRestrictionsForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsGetRestrictionsForRepoParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. + */ + removeRestrictionsForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsRemoveRestrictionsForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. + */ + removeRestrictionsForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsRemoveRestrictionsForRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + }; + issues: { + /** + * Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + * + * This example adds two assignees to the existing `octocat` assignee. + */ + addAssignees: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesAddAssigneesParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesAddAssigneesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + addLabels: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesAddLabelsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesAddLabelsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + */ + checkAssignee: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesCheckAssigneeParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + create: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesCreateParamsDeprecatedAssignee + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.IssuesCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createComment: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesCreateCommentParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesCreateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + createLabel: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesCreateLabelParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + createMilestone: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesCreateMilestoneParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + deleteComment: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesDeleteCommentParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteLabel: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesDeleteLabelParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteMilestone: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesDeleteMilestoneParamsDeprecatedNumber + ): Promise; + ( + params?: Octokit.RequestOptions & Octokit.IssuesDeleteMilestoneParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://developer.github.com/v3/#http-redirects) if the issue was [transferred](https://help.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://developer.github.com/v3/activity/events/types/#issuesevent) 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://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + get: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesGetParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.IssuesGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getComment: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesGetCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getEvent: { + (params?: Octokit.RequestOptions & Octokit.IssuesGetEventParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getLabel: { + (params?: Octokit.RequestOptions & Octokit.IssuesGetLabelParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getMilestone: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesGetMilestoneParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesGetMilestoneParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.IssuesListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + */ + listAssignees: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesListAssigneesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Issue Comments are ordered by ascending ID. + */ + listComments: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListCommentsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesListCommentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * By default, Issue Comments are ordered by ascending ID. + */ + listCommentsForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListCommentsForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listEvents: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListEventsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesListEventsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listEventsForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesListEventsForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listEventsForTimeline: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListEventsForTimelineParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListEventsForTimelineParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + listForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + listForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesListForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + listForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesListForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listLabelsForMilestone: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListLabelsForMilestoneParamsDeprecatedNumber + ): Promise< + Octokit.Response + >; + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListLabelsForMilestoneParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listLabelsForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesListLabelsForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listLabelsOnIssue: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListLabelsOnIssueParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesListLabelsOnIssueParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listMilestonesForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListMilestonesForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/#http-verbs)." + */ + lock: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesLockParamsDeprecatedNumber + ): Promise; + (params?: Octokit.RequestOptions & Octokit.IssuesLockParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes one or more assignees from an issue. + * + * This example removes two of three assignees, leaving the `octocat` assignee. + */ + removeAssignees: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesRemoveAssigneesParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesRemoveAssigneesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.IssuesRemoveLabelParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesRemoveLabelParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + removeLabels: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesRemoveLabelsParamsDeprecatedNumber + ): Promise; + ( + params?: Octokit.RequestOptions & Octokit.IssuesRemoveLabelsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + replaceLabels: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesReplaceLabelsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesReplaceLabelsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access can unlock an issue's conversation. + */ + unlock: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesUnlockParamsDeprecatedNumber + ): Promise; + (params?: Octokit.RequestOptions & Octokit.IssuesUnlockParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Issue owners and users with push access can edit an issue. + */ + update: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesUpdateParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.IssuesUpdateParamsDeprecatedAssignee + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.IssuesUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateComment: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesUpdateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateLabel: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesUpdateLabelParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateMilestone: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesUpdateMilestoneParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesUpdateMilestoneParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + licenses: { + get: { + (params?: Octokit.RequestOptions & Octokit.LicensesGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [the repository contents API](https://developer.github.com/v3/repos/contents/#get-contents), this method also supports [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw license content or rendered license HTML. + */ + getForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.LicensesGetForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * @deprecated octokit.licenses.list() has been renamed to octokit.licenses.listCommonlyUsed() (2019-03-05) + */ + list: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listCommonlyUsed: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + markdown: { + render: { + (params?: Octokit.RequestOptions & Octokit.MarkdownRenderParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.MarkdownRenderRawParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + }; + meta: { + /** + * This endpoint provides a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://help.github.com/articles/about-github-s-ip-addresses/)." + */ + get: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + migrations: { + /** + * Stop an import for a repository. + */ + cancelImport: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsCancelImportParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/migrations/users/#list-user-migrations) and [Get the status of a user migration](https://developer.github.com/v3/migrations/users/#get-the-status-of-a-user-migration) endpoints, will continue to be available even after an archive is deleted. + */ + deleteArchiveForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsDeleteArchiveForAuthenticatedUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + */ + deleteArchiveForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsDeleteArchiveForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.MigrationsGetArchiveForAuthenticatedUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Fetches the URL to a migration archive. + */ + getArchiveForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsGetArchiveForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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 API method and the "Map a commit author" method allow you to provide correct Git author information. + */ + getCommitAuthors: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsGetCommitAuthorsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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 Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-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://github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com) 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 Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://developer.github.com/v3/migrations/source_imports/#cancel-an-import) and [retry](https://developer.github.com/v3/migrations/source_imports/#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-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. + */ + getImportProgress: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsGetImportProgressParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List files larger than 100MB found during the import + */ + getLargeFiles: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsGetLargeFilesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/migrations/users/#download-a-user-migration-archive). + */ + getStatusForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsGetStatusForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.MigrationsGetStatusForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.MigrationsGetStatusForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all migrations a user has started. + */ + listForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsListForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the most recent migrations. + */ + listForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsListForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all the repositories for this organization migration. + */ + listReposForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsListReposForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all the repositories for this user migration. + */ + listReposForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsListReposForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.MigrationsMapCommitAuthorParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://help.github.com/articles/versioning-large-files/). + */ + setLfsPreference: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsSetLfsPreferenceParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Initiates the generation of a user migration archive. + */ + startForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsStartForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Initiates the generation of a migration archive. + */ + startForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsStartForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Start a source import to a GitHub repository using GitHub Importer. + */ + startImport: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsStartImportParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Unlocks a repository. You can lock repositories when you [start a user migration](https://developer.github.com/v3/migrations/users/#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://developer.github.com/v3/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?: Octokit.RequestOptions & + Octokit.MigrationsUnlockRepoForAuthenticatedUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://developer.github.com/v3/repos/#delete-a-repository) when the migration is complete and you no longer need the source data. + */ + unlockRepoForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsUnlockRepoForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + * + * The following example demonstrates the workflow for updating an import with "project1" as the project choice. Given a `project_choices` array like such: + * + * To restart an import, no parameters are provided in the update request. + */ + updateImport: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsUpdateImportParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + oauthAuthorizations: { + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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://developer.github.com/v3/auth#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`. + * @deprecated octokit.oauthAuthorizations.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization + */ + checkAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsCheckAuthorizationParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * **Warning:** Apps must use the [web application flow](https://developer.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://developer.github.com/v3/auth#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://developer.github.com/v3/auth/#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://help.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be whitelisted. Read more about whitelisting tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + * @deprecated octokit.oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization + */ + createAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsCreateAuthorizationParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated octokit.oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization + */ + deleteAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsDeleteAuthorizationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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). + * @deprecated octokit.oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant + */ + deleteGrant: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsDeleteGrantParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated octokit.oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization + */ + getAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsGetAuthorizationParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated octokit.oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant + */ + getGrant: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsGetGrantParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * **Warning:** Apps must use the [web application flow](https://developer.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://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated octokit.oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app + */ + getOrCreateAuthorizationForApp: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppParams + ): Promise< + Octokit.Response< + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * **Warning:** Apps must use the [web application flow](https://developer.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://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * @deprecated octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint + */ + getOrCreateAuthorizationForAppAndFingerprint: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams + ): Promise< + Octokit.Response< + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * **Warning:** Apps must use the [web application flow](https://developer.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://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * @deprecated octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint + */ + getOrCreateAuthorizationForAppFingerprint: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams + ): Promise< + Octokit.Response< + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated octokit.oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations + */ + listAuthorizations: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsListAuthorizationsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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://developer.github.com/v3/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"]`. + * @deprecated octokit.oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants + */ + listGrants: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsListGrantsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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://developer.github.com/v3/auth#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`. + * @deprecated octokit.oauthAuthorizations.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization + */ + resetAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsResetAuthorizationParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + * @deprecated octokit.oauthAuthorizations.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application + */ + revokeAuthorizationForApplication: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsRevokeAuthorizationForApplicationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#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 token as `:access_token` 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 Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). + * @deprecated octokit.oauthAuthorizations.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application + */ + revokeGrantForApplication: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsRevokeGrantForApplicationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * 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://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * + * You can only send one of these scope keys at a time. + * @deprecated octokit.oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization + */ + updateAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsUpdateAuthorizationParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + orgs: { + /** + * 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://developer.github.com/v3/orgs/members/#get-organization-membership) 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. + */ + addOrUpdateMembership: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsAddOrUpdateMembershipParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + blockUser: { + (params?: Octokit.RequestOptions & Octokit.OrgsBlockUserParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If the user is blocked: + * + * If the user is not blocked: + */ + checkBlockedUser: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsCheckBlockedUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Check if a user is, publicly or privately, a member of the organization. + */ + checkMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsCheckMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + checkPublicMembership: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsCheckPublicMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + concealMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsConcealMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". + */ + convertMemberToOutsideCollaborator: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsConvertMemberToOutsideCollaboratorParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Here's how you can create a hook that posts payloads in JSON format: + */ + createHook: { + (params?: Octokit.RequestOptions & Octokit.OrgsCreateHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createInvitation: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsCreateInvitationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + deleteHook: { + (params?: Octokit.RequestOptions & Octokit.OrgsDeleteHookParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://help.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://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see "[Response with GitHub plan information](https://developer.github.com/v3/orgs/#response-with-github-plan-information)." + */ + get: { + (params?: Octokit.RequestOptions & Octokit.OrgsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getHook: { + (params?: Octokit.RequestOptions & Octokit.OrgsGetHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * In order to get a user's membership with an organization, the authenticated user must be an organization member. + */ + getMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsGetMembershipParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getMembershipForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsGetMembershipForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/#link-header) to get the URL for the next page of organizations. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.OrgsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the users blocked by an organization. + */ + listBlockedUsers: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListBlockedUsersParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.OrgsListForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List [public organization memberships](https://help.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 your organizations](https://developer.github.com/v3/orgs/#list-your-organizations) API instead. + */ + listForUser: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listHooks: { + (params?: Octokit.RequestOptions & Octokit.OrgsListHooksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + */ + listInstallations: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListInstallationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.OrgsListInvitationTeamsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.OrgsListMembersParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listMemberships: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListMembershipsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all users who are outside collaborators of an organization. + */ + listOutsideCollaborators: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsListOutsideCollaboratorsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.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`. + */ + listPendingInvitations: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsListPendingInvitationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Members of an organization can choose to have their membership publicized or not. + */ + listPublicMembers: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListPublicMembersParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. + */ + pingHook: { + (params?: Octokit.RequestOptions & Octokit.OrgsPingHookParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/#http-verbs)." + */ + publicizeMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsPublicizeMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.OrgsRemoveMemberParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + */ + removeMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsRemoveMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Removing a user from this list will remove them from all the organization's repositories. + */ + removeOutsideCollaborator: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsRemoveOutsideCollaboratorParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + unblockUser: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsUnblockUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **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. 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?: Octokit.RequestOptions & + Octokit.OrgsUpdateParamsDeprecatedMembersAllowedRepositoryCreationType + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.OrgsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateHook: { + (params?: Octokit.RequestOptions & Octokit.OrgsUpdateHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsUpdateMembershipParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + projects: { + /** + * Adds a collaborator to a an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. + */ + addCollaborator: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsAddCollaboratorParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + createCard: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsCreateCardParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + createColumn: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsCreateColumnParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + createForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ProjectsCreateForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ProjectsCreateForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ProjectsCreateForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a project board. Returns a `404 Not Found` status if projects are disabled. + */ + delete: { + (params?: Octokit.RequestOptions & Octokit.ProjectsDeleteParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + deleteCard: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsDeleteCardParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteColumn: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsDeleteColumnParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ProjectsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getCard: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsGetCardParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getColumn: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsGetColumnParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listCards: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsListCardsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.ProjectsListCollaboratorsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listColumns: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsListColumnsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + * + * s + */ + listForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsListForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ProjectsListForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listForUser: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsListForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + moveCard: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsMoveCardParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + moveColumn: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsMoveColumnParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. + */ + removeCollaborator: { + ( + params?: Octokit.RequestOptions & + Octokit.ProjectsRemoveCollaboratorParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + */ + reviewUserPermissionLevel: { + ( + params?: Octokit.RequestOptions & + Octokit.ProjectsReviewUserPermissionLevelParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ProjectsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateCard: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsUpdateCardParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateColumn: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsUpdateColumnParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + pulls: { + checkIfMerged: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCheckIfMergedParamsDeprecatedNumber + ): Promise; + ( + params?: Octokit.RequestOptions & Octokit.PullsCheckIfMergedParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + create: { + (params?: Octokit.RequestOptions & Octokit.PullsCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Comments](https://developer.github.com/v3/issues/comments/#create-a-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see [Multi-line comment summary](https://developer.github.com/v3/pulls/comments/#multi-line-comment-summary-3). + * + * **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://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + */ + createComment: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateCommentParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateCommentParamsDeprecatedInReplyTo + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsCreateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Comments](https://developer.github.com/v3/issues/comments/#create-a-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see [Multi-line comment summary](https://developer.github.com/v3/pulls/comments/#multi-line-comment-summary-3). + * + * **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://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * @deprecated octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (2019-09-09) + */ + createCommentReply: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateCommentReplyParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateCommentReplyParamsDeprecatedInReplyTo + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsCreateCommentReplyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + createFromIssue: { + ( + params?: Octokit.RequestOptions & Octokit.PullsCreateFromIssueParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **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://developer.github.com/v3/media/#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://developer.github.com/v3/pulls/#get-a-single-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?: Octokit.RequestOptions & + Octokit.PullsCreateReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsCreateReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createReviewCommentReply: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateReviewCommentReplyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createReviewRequest: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateReviewRequestParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsCreateReviewRequestParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a review comment. + */ + deleteComment: { + ( + params?: Octokit.RequestOptions & Octokit.PullsDeleteCommentParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deletePendingReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsDeletePendingReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsDeletePendingReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + deleteReviewRequest: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsDeleteReviewRequestParamsDeprecatedNumber + ): Promise; + ( + params?: Octokit.RequestOptions & Octokit.PullsDeleteReviewRequestParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** To dismiss a pull request review on a [protected branch](https://developer.github.com/v3/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?: Octokit.RequestOptions & + Octokit.PullsDismissReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsDismissReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://developer.github.com/v3/pulls/#create-a-pull-request), or [edit](https://developer.github.com/v3/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://developer.github.com/v3/git/#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://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://help.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://help.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://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: { + ( + params?: Octokit.RequestOptions & Octokit.PullsGetParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.PullsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Provides details for a review comment. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * + * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. + */ + getComment: { + ( + params?: Octokit.RequestOptions & Octokit.PullsGetCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getCommentsForReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsGetCommentsForReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.PullsGetCommentsForReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsGetReviewParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.PullsGetReviewParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.PullsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Lists review comments for a pull request. By default, review comments are in ascending order by ID. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * + * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. + */ + listComments: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsListCommentsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsListCommentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * + * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. + */ + listCommentsForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.PullsListCommentsForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository). + */ + listCommits: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsListCommitsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsListCommitsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The response includes a maximum of 300 files. + */ + listFiles: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsListFilesParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.PullsListFilesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listReviewRequests: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsListReviewRequestsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsListReviewRequestsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * The list of reviews returns in chronological order. + */ + listReviews: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsListReviewsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsListReviewsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + merge: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsMergeParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.PullsMergeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + submitReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsSubmitReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsSubmitReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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?: Octokit.RequestOptions & + Octokit.PullsUpdateParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.PullsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + */ + updateBranch: { + ( + params?: Octokit.RequestOptions & Octokit.PullsUpdateBranchParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Enables you to edit a review comment. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + */ + updateComment: { + ( + params?: Octokit.RequestOptions & Octokit.PullsUpdateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Update the review summary comment with new text. + */ + updateReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsUpdateReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsUpdateReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + rateLimit: { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Understanding your rate limit status** + * + * The Search API has a [custom rate limit](https://developer.github.com/v3/search/#rate-limit), separate from the rate limit governing the rest of the REST API. The GraphQL API also has a [custom rate limit](https://developer.github.com/v4/guides/resource-limitations/#rate-limit) that is separate from and calculated differently than rate limits in the REST API. + * + * For these reasons, the Rate Limit API response categorizes your rate limit. Under `resources`, you'll see four objects: + * + * * The `core` object provides your rate limit status for all non-search-related resources in the REST API. + * * The `search` object provides your rate limit status for the [Search API](https://developer.github.com/v3/search/). + * * The `graphql` object provides your rate limit status for the [GraphQL API](https://developer.github.com/v4/). + * * The `integration_manifest` object provides your rate limit status for the [GitHub App Manifest code conversion](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration) endpoint. + * + * For more information on the headers and values in the rate limit response, see "[Rate limiting](https://developer.github.com/v3/#rate-limiting)." + * + * The `rate` object (shown at the bottom of the response above) 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?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + reactions: { + /** + * Create a reaction to a [commit comment](https://developer.github.com/v3/repos/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this commit comment. + */ + createForCommitComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForCommitCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to an [issue](https://developer.github.com/v3/issues/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue. + */ + createForIssue: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForIssueParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.ReactionsCreateForIssueParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to an [issue comment](https://developer.github.com/v3/issues/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue comment. + */ + createForIssueComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForIssueCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this pull request review comment. + */ + createForPullRequestReviewComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForPullRequestReviewCommentParams + ): Promise< + Octokit.Response< + Octokit.ReactionsCreateForPullRequestReviewCommentResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion. + * @deprecated octokit.reactions.createForTeamDiscussion() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy + */ + createForTeamDiscussion: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForTeamDiscussionParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion comment`](https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment) endpoint. + * + * Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment. + * @deprecated octokit.reactions.createForTeamDiscussionComment() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + createForTeamDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForTeamDiscussionCommentParams + ): Promise< + Octokit.Response< + Octokit.ReactionsCreateForTeamDiscussionCommentResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` 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?: Octokit.RequestOptions & + Octokit.ReactionsCreateForTeamDiscussionCommentInOrgParams + ): Promise< + Octokit.Response< + Octokit.ReactionsCreateForTeamDiscussionCommentInOrgResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion comment`](https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment) endpoint. + * + * Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment. + * @deprecated octokit.reactions.createForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + createForTeamDiscussionCommentLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForTeamDiscussionCommentLegacyParams + ): Promise< + Octokit.Response< + Octokit.ReactionsCreateForTeamDiscussionCommentLegacyResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` 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?: Octokit.RequestOptions & + Octokit.ReactionsCreateForTeamDiscussionInOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion. + * @deprecated octokit.reactions.createForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy + */ + createForTeamDiscussionLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForTeamDiscussionLegacyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://developer.github.com/v3/teams/discussions/) or [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). + */ + delete: { + ( + params?: Octokit.RequestOptions & Octokit.ReactionsDeleteParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [commit comment](https://developer.github.com/v3/repos/comments/). + */ + listForCommitComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForCommitCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to an [issue](https://developer.github.com/v3/issues/). + */ + listForIssue: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForIssueParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.ReactionsListForIssueParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to an [issue comment](https://developer.github.com/v3/issues/comments/). + */ + listForIssueComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForIssueCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). + */ + listForPullRequestReviewComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForPullRequestReviewCommentParams + ): Promise< + Octokit.Response< + Octokit.ReactionsListForPullRequestReviewCommentResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.reactions.listForTeamDiscussion() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy + */ + listForTeamDiscussion: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForTeamDiscussionParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.reactions.listForTeamDiscussionComment() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + listForTeamDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForTeamDiscussionCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.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?: Octokit.RequestOptions & + Octokit.ReactionsListForTeamDiscussionCommentInOrgParams + ): Promise< + Octokit.Response< + Octokit.ReactionsListForTeamDiscussionCommentInOrgResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.reactions.listForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + listForTeamDiscussionCommentLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForTeamDiscussionCommentLegacyParams + ): Promise< + Octokit.Response< + Octokit.ReactionsListForTeamDiscussionCommentLegacyResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.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?: Octokit.RequestOptions & + Octokit.ReactionsListForTeamDiscussionInOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.reactions.listForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy + */ + listForTeamDiscussionLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForTeamDiscussionLegacyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + repos: { + acceptInvitation: { + ( + params?: Octokit.RequestOptions & Octokit.ReposAcceptInvitationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * 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://developer.github.com/v3/#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://developer.github.com/v3/repos/invitations/). + * + * **Rate limits** + * + * To prevent abuse, 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?: Octokit.RequestOptions & Octokit.ReposAddCollaboratorParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Here's how you can create a read-only deploy key: + */ + addDeployKey: { + ( + params?: Octokit.RequestOptions & Octokit.ReposAddDeployKeyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. + */ + addProtectedBranchAdminEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchAdminEnforcementParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchAdminEnforcementResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. | + */ + addProtectedBranchAppRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchAppRestrictionsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. + */ + addProtectedBranchRequiredSignatures: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchRequiredSignaturesParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchRequiredSignaturesResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + addProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. | + */ + addProtectedBranchTeamRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. | + */ + addProtectedBranchUserRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchUserRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + */ + checkCollaborator: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCheckCollaboratorParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows whether vulnerability alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + */ + checkVulnerabilityAlerts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposCheckVulnerabilityAlertsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/media/#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** + * + * The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository) to enumerate all commits in the range. + * + * For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long to generate. You can typically resolve this error by using a smaller commit range. + * + * **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: + * + * 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?: Octokit.RequestOptions & Octokit.ReposCompareCommitsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createCommitComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposCreateCommitCommentParamsDeprecatedSha + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.ReposCreateCommitCommentParamsDeprecatedLine + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateCommitCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Deployments offer a few configurable parameters with sane 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://developer.github.com/v3/repos/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: + * + * A simple example putting the user and room into the payload to notify back to chat networks. + * + * A more advanced example specifying required commit statuses and bypassing auto-merging. + * + * 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. + * + * 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. + * + * 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?: Octokit.RequestOptions & Octokit.ReposCreateDeploymentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.ReposCreateDeploymentStatusParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/activity/events/types/#repositorydispatchevent)." + * + * 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. For a test example, see the [input example](https://developer.github.com/v3/repos/#example-4). + * + * To give you write access to the repository, you must use a personal access token with the `repo` scope. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + createDispatchEvent: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateDispatchEventParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new file or updates an existing file in a repository. + * @deprecated octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07) + */ + createFile: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateFileParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.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 + * * `repo` scope to create a private repository + */ + createForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposCreateForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com). + */ + createFork: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateForkParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + * + * Here's how you can create a hook that posts payloads in JSON format: + */ + createHook: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateHookParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.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 + * * `repo` scope to create a private repository + */ + createInOrg: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new file or updates an existing file in a repository. + */ + createOrUpdateFile: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateOrUpdateFileParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createRelease: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateReleaseParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + */ + createStatus: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateStatusParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. 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 /repos/:owner/:repo`](https://developer.github.com/v3/repos/#get) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.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 + * * `repo` scope to create a private repository + * + * \` + */ + createUsingTemplate: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateUsingTemplateParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + declineInvitation: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeclineInvitationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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, a member will get this response: + */ + delete: { + (params?: Octokit.RequestOptions & Octokit.ReposDeleteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteCommitComment: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteCommitCommentParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteDownload: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteDownloadParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ReposDeleteFileParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + deleteHook: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteHookParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteInvitation: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteInvitationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can delete a release. + */ + deleteRelease: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteReleaseParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteReleaseAsset: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteReleaseAssetParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. + */ + disableAutomatedSecurityFixes: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposDisableAutomatedSecurityFixesParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + disablePagesSite: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDisablePagesSiteParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Disables vulnerability 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://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + */ + disableVulnerabilityAlerts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposDisableVulnerabilityAlertsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. + */ + enableAutomatedSecurityFixes: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposEnableAutomatedSecurityFixesParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + enablePagesSite: { + ( + params?: Octokit.RequestOptions & Octokit.ReposEnablePagesSiteParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables vulnerability 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://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + */ + enableVulnerabilityAlerts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposEnableVulnerabilityAlertsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ReposGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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?: Octokit.RequestOptions & + Octokit.ReposGetAppsWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposGetAppsWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets a redirect URL to download an archive for a repository. The `:archive_format` can be either `tarball` or `zipball`. The `:ref` must be a valid Git reference. 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. + * + * To follow redirects with curl, use the `-L` switch: + */ + getArchiveLink: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetArchiveLinkParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + getBranch: { + (params?: Octokit.RequestOptions & Octokit.ReposGetBranchParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getBranchProtection: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetBranchProtectionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ReposGetClonesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns a weekly aggregate of the number of additions and deletions pushed to a repository. + */ + getCodeFrequencyStats: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetCodeFrequencyStatsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Possible values for the `permission` key: `admin`, `write`, `read`, `none`. + */ + getCollaboratorPermissionLevel: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetCollaboratorPermissionLevelParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + * + * The most recent status for each context is returned, up to 100. This field [paginates](https://developer.github.com/v3/#pagination) if there are over 100 contexts. + * + * 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?: Octokit.RequestOptions & + Octokit.ReposGetCombinedStatusForRefParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * You can pass the appropriate [media type](https://developer.github.com/v3/media/#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://developer.github.com/v3/media/#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: + * + * 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?: Octokit.RequestOptions & + Octokit.ReposGetCommitParamsDeprecatedSha + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetCommitParamsDeprecatedCommitSha + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.ReposGetCommitParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.ReposGetCommitActivityStatsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getCommitComment: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetCommitCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** To access this endpoint, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header: + * ``` + * application/vnd.github.VERSION.sha + * ``` + * Returns the SHA-1 of the commit reference. You must have `read` access for the repository to get the SHA-1 of a commit reference. You can use this endpoint to check if a remote reference's SHA-1 is the same as your local reference's SHA-1 by providing the local SHA-1 reference as the ETag. + * @deprecated "Get the SHA-1 of a commit reference" will be removed. Use "Get a single commit" instead with media type format set to "sha" instead. + */ + getCommitRefSha: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetCommitRefShaParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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 all files in the repository. + * + * Files and symlinks support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML (when supported). All content types support [a custom media type](https://developer.github.com/v3/repos/contents/#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://developer.github.com/v3/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://developer.github.com/v3/git/trees/#get-a-tree). + * * This API supports files up to 1 megabyte in size. + * + * 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 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 above](https://developer.github.com/v3/repos/contents/#response-if-content-is-a-file)). + * + * Otherwise, the API responds with an object describing the symlink itself: + * + * 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. + */ + getContents: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetContentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * * `total` - The Total number of commits authored by the contributor. + * + * Weekly Hash (`weeks` array): + * + * * `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?: Octokit.RequestOptions & + Octokit.ReposGetContributorsStatsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getDeployKey: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetDeployKeyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getDeployment: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetDeploymentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with pull access can view a deployment status for a deployment: + */ + getDeploymentStatus: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetDeploymentStatusParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getDownload: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetDownloadParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getHook: { + (params?: Octokit.RequestOptions & Octokit.ReposGetHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getLatestPagesBuild: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetLatestPagesBuildParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ReposGetLatestReleaseParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getPages: { + (params?: Octokit.RequestOptions & Octokit.ReposGetPagesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getPagesBuild: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetPagesBuildParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.ReposGetParticipationStatsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getProtectedBranchAdminEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetProtectedBranchAdminEnforcementParams + ): Promise< + Octokit.Response< + Octokit.ReposGetProtectedBranchAdminEnforcementResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getProtectedBranchPullRequestReviewEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetProtectedBranchPullRequestReviewEnforcementParams + ): Promise< + Octokit.Response< + Octokit.ReposGetProtectedBranchPullRequestReviewEnforcementResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + getProtectedBranchRequiredSignatures: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetProtectedBranchRequiredSignaturesParams + ): Promise< + Octokit.Response< + Octokit.ReposGetProtectedBranchRequiredSignaturesResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getProtectedBranchRequiredStatusChecks: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetProtectedBranchRequiredStatusChecksParams + ): Promise< + Octokit.Response< + Octokit.ReposGetProtectedBranchRequiredStatusChecksResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. {{#note}} + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + getProtectedBranchRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetProtectedBranchRestrictionsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ReposGetPunchCardStatsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML. + */ + getReadme: { + (params?: Octokit.RequestOptions & Octokit.ReposGetReadmeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/v3/#hypermedia). + */ + getRelease: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetReleaseParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://developer.github.com/v3/media/#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?: Octokit.RequestOptions & Octokit.ReposGetReleaseAssetParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Get a published release with the specified tag. + */ + getReleaseByTag: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetReleaseByTagParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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?: Octokit.RequestOptions & + Octokit.ReposGetTeamsWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposGetTeamsWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get the top 10 popular contents over the last 14 days. + */ + getTopPaths: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetTopPathsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Get the top 10 referrers over the last 14 days. + */ + getTopReferrers: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetTopReferrersParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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?: Octokit.RequestOptions & + Octokit.ReposGetUsersWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposGetUsersWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ReposGetViewsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.ReposListParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. + * @deprecated octokit.repos.listAppsWithAccessToProtectedBranch() has been renamed to octokit.repos.getAppsWithAccessToProtectedBranch() (2019-09-13) + */ + listAppsWithAccessToProtectedBranch: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListAppsWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposListAppsWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + listAssetsForRelease: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListAssetsForReleaseParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listBranches: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListBranchesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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?: Octokit.RequestOptions & + Octokit.ReposListBranchesForHeadCommitParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + */ + listCollaborators: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListCollaboratorsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Use the `:commit_sha` to specify the commit that will have its comments listed. + */ + listCommentsForCommit: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListCommentsForCommitParamsDeprecatedRef + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.ReposListCommentsForCommitParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Commit Comments use [these custom media types](https://developer.github.com/v3/repos/comments/#custom-media-types). You can read more about the use of media types in the API [here](https://developer.github.com/v3/media/). + * + * Comments are ordered by ascending ID. + */ + listCommitComments: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListCommitCommentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **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: + * + * 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?: Octokit.RequestOptions & Octokit.ReposListCommitsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ReposListContributorsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listDeployKeys: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListDeployKeysParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with pull access can view deployment statuses for a deployment: + */ + listDeploymentStatuses: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListDeploymentStatusesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Simple filtering of deployments is available via query parameters: + */ + listDeployments: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListDeploymentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listDownloads: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListDownloadsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists repositories for the specified organization. + */ + listForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists public repositories for the specified user. + */ + listForUser: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listForks: { + (params?: Octokit.RequestOptions & Octokit.ReposListForksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listHooks: { + (params?: Octokit.RequestOptions & Octokit.ReposListHooksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + */ + listInvitations: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListInvitationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + */ + listInvitationsForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListInvitationsForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.ReposListInvitationsForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.ReposListLanguagesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listPagesBuilds: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListPagesBuildsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + listProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposListProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. + * @deprecated octokit.repos.listProtectedBranchTeamRestrictions() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-09) + */ + listProtectedBranchTeamRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposListProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + * @deprecated octokit.repos.listProtectedBranchUserRestrictions() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-09) + */ + listProtectedBranchUserRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListProtectedBranchUserRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposListProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of repositories. + */ + listPublic: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListPublicParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoint. + */ + listPullRequestsAssociatedWithCommit: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListPullRequestsAssociatedWithCommitParams + ): Promise< + Octokit.Response< + Octokit.ReposListPullRequestsAssociatedWithCommitResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/repos/#list-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + listReleases: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListReleasesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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`. + */ + listStatusesForRef: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListStatusesForRefParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listTags: { + (params?: Octokit.RequestOptions & Octokit.ReposListTagsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listTeams: { + (params?: Octokit.RequestOptions & Octokit.ReposListTeamsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. + * @deprecated octokit.repos.listTeamsWithAccessToProtectedBranch() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-13) + */ + listTeamsWithAccessToProtectedBranch: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListTeamsWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposListTeamsWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + listTopics: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListTopicsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + * @deprecated octokit.repos.listUsersWithAccessToProtectedBranch() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-13) + */ + listUsersWithAccessToProtectedBranch: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListUsersWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposListUsersWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + merge: { + (params?: Octokit.RequestOptions & Octokit.ReposMergeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. + */ + pingHook: { + (params?: Octokit.RequestOptions & Octokit.ReposPingHookParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + removeBranchProtection: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveBranchProtectionParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + removeCollaborator: { + ( + params?: Octokit.RequestOptions & Octokit.ReposRemoveCollaboratorParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + removeDeployKey: { + ( + params?: Octokit.RequestOptions & Octokit.ReposRemoveDeployKeyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. + */ + removeProtectedBranchAdminEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchAdminEnforcementParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. | + */ + removeProtectedBranchAppRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchAppRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchAppRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + removeProtectedBranchPullRequestReviewEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchPullRequestReviewEnforcementParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. + */ + removeProtectedBranchRequiredSignatures: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchRequiredSignaturesParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + removeProtectedBranchRequiredStatusChecks: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchRequiredStatusChecksParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + removeProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. + */ + removeProtectedBranchRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchRestrictionsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. | + */ + removeProtectedBranchTeamRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. | + */ + removeProtectedBranchUserRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchUserRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. | + */ + replaceProtectedBranchAppRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposReplaceProtectedBranchAppRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchAppRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + replaceProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposReplaceProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. | + */ + replaceProtectedBranchTeamRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposReplaceProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. | + */ + replaceProtectedBranchUserRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposReplaceProtectedBranchUserRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + replaceTopics: { + ( + params?: Octokit.RequestOptions & Octokit.ReposReplaceTopicsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * 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. + */ + requestPageBuild: { + ( + params?: Octokit.RequestOptions & Octokit.ReposRequestPageBuildParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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. + */ + retrieveCommunityProfileMetrics: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRetrieveCommunityProfileMetricsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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` + */ + testPushHook: { + ( + params?: Octokit.RequestOptions & Octokit.ReposTestPushHookParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://help.github.com/articles/about-repository-transfers/). + */ + transfer: { + (params?: Octokit.RequestOptions & Octokit.ReposTransferParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: To edit a repository's topics, use the [`topics` endpoint](https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository). + */ + update: { + (params?: Octokit.RequestOptions & Octokit.ReposUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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?: Octokit.RequestOptions & + Octokit.ReposUpdateBranchProtectionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateCommitComment: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateCommitCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new file or updates an existing file in a repository. + * @deprecated octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07) + */ + updateFile: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateFileParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateHook: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateHookParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateInformationAboutPagesSite: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposUpdateInformationAboutPagesSiteParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + updateInvitation: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateInvitationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. + */ + updateProtectedBranchPullRequestReviewEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposUpdateProtectedBranchPullRequestReviewEnforcementParams + ): Promise< + Octokit.Response< + Octokit.ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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. + */ + updateProtectedBranchRequiredStatusChecks: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposUpdateProtectedBranchRequiredStatusChecksParams + ): Promise< + Octokit.Response< + Octokit.ReposUpdateProtectedBranchRequiredStatusChecksResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can edit a release. + */ + updateRelease: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateReleaseParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can edit a release asset. + */ + updateReleaseAsset: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateReleaseAssetParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://developer.github.com/v3/#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://developer.github.com/v3/repos/releases/#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset. + */ + uploadReleaseAsset: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUploadReleaseAssetParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + search: { + /** + * Find file contents via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#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://developer.github.com/v3/search/#text-match-metadata). + * + * **Note:** You must [authenticate](https://developer.github.com/v3/#authentication) to search for code across all public repositories. + * + * **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. + * + * Suppose you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery). Your query would look something like this: + * + * Here, we're searching for the keyword `addClass` within a file's contents. We're making sure that we're only looking in files where the language is JavaScript. And we're scoping the search to the `repo:jquery/jquery` repository. + */ + code: { + (params?: Octokit.RequestOptions & Octokit.SearchCodeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find commits via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#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://developer.github.com/v3/search/#text-match-metadata). + * + * **Considerations for commit search** + * + * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * + * Suppose 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: + */ + commits: { + (params?: Octokit.RequestOptions & Octokit.SearchCommitsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This API call is added for compatibility reasons only. There's no guarantee that full email searches will always be available. The `@` character in the address must be left unencoded. Searches only against public email addresses (as configured on the user's GitHub profile). + * @deprecated octokit.search.emailLegacy() is deprecated, see https://developer.github.com/v3/search/legacy/#email-search + */ + emailLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.SearchEmailLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#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://developer.github.com/v3/search/#text-match-metadata). + * + * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. + * @deprecated octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27) + */ + issues: { + (params?: Octokit.RequestOptions & Octokit.SearchIssuesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#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://developer.github.com/v3/search/#text-match-metadata). + * + * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. + */ + issuesAndPullRequests: { + ( + params?: Octokit.RequestOptions & + Octokit.SearchIssuesAndPullRequestsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Find issues by state and keyword. + * @deprecated octokit.search.issuesLegacy() is deprecated, see https://developer.github.com/v3/search/legacy/#search-issues + */ + issuesLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.SearchIssuesLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://developer.github.com/v3/#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://developer.github.com/v3/search/#text-match-metadata). + * + * Suppose you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * The labels that best match for the query appear first in the search results. + */ + labels: { + (params?: Octokit.RequestOptions & Octokit.SearchLabelsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#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://developer.github.com/v3/search/#text-match-metadata). + * + * Suppose you want to search for popular Tetris repositories written in Assembly. Your query might look like this. + * + * You can search for multiple topics by adding more `topic:` instances, and including the `mercy-preview` header. For example: + * + * In this request, we're searching for repositories with the word `tetris` in the name, the description, or the README. We're limiting the results to only find repositories where the primary language is Assembly. We're sorting by stars in descending order, so that the most popular repositories appear first in the search results. + */ + repos: { + (params?: Octokit.RequestOptions & Octokit.SearchReposParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find repositories by keyword. Note, this legacy method does not follow the v3 pagination pattern. This method returns up to 100 results per page and pages can be fetched using the `start_page` parameter. + * @deprecated octokit.search.reposLegacy() is deprecated, see https://developer.github.com/v3/search/legacy/#search-repositories + */ + reposLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.SearchReposLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * 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://developer.github.com/v3/search/#text-match-metadata). + * + * See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * Suppose you want to search for topics related to Ruby that are featured on [https://github.com/topics](https://github.com/topics). Your query might look like this: + * + * In this request, we're searching for topics with the keyword `ruby`, and we're limiting the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + * + * **Note:** A search for featured Ruby topics only has 6 total results, so a [Link header](https://developer.github.com/v3/#link-header) indicating pagination is not included in the response. + */ + topics: { + (params?: Octokit.RequestOptions & Octokit.SearchTopicsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#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://developer.github.com/v3/search/#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Imagine you're looking for a list of popular users. You might try out this query: + * + * Here, we're looking at users with the name Tom. We're only interested in those with more than 42 repositories, and only if they have over 1,000 followers. + */ + users: { + (params?: Octokit.RequestOptions & Octokit.SearchUsersParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find users by keyword. + * @deprecated octokit.search.usersLegacy() is deprecated, see https://developer.github.com/v3/search/legacy/#search-users + */ + usersLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.SearchUsersLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + teams: { + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add team membership](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) 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://help.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://help.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://developer.github.com/v3/#http-verbs)." + * @deprecated octokit.teams.addMember() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member-legacy + */ + addMember: { + (params?: Octokit.RequestOptions & Octokit.TeamsAddMemberParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add team membership](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) 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://help.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://help.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://developer.github.com/v3/#http-verbs)." + * @deprecated octokit.teams.addMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member-legacy + */ + addMemberLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsAddMemberLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team membership`](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.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. + * @deprecated octokit.teams.addOrUpdateMembership() is deprecated, see https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy + */ + addOrUpdateMembership: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsAddOrUpdateMembershipParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.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`. + */ + addOrUpdateMembershipInOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsAddOrUpdateMembershipInOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team membership`](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.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. + * @deprecated octokit.teams.addOrUpdateMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy + */ + addOrUpdateMembershipLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsAddOrUpdateMembershipLegacyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team project`](https://developer.github.com/v3/teams/#add-or-update-team-project) 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. + * @deprecated octokit.teams.addOrUpdateProject() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-project-legacy + */ + addOrUpdateProject: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsAddOrUpdateProjectParams + ): Promise>; + + endpoint: Octokit.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. + * + * **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`. + */ + addOrUpdateProjectInOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsAddOrUpdateProjectInOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team project`](https://developer.github.com/v3/teams/#add-or-update-team-project) 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. + * @deprecated octokit.teams.addOrUpdateProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-project-legacy + */ + addOrUpdateProjectLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsAddOrUpdateProjectLegacyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team repository`](https://developer.github.com/v3/teams/#add-or-update-team-repository) 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://developer.github.com/v3/#http-verbs)." + * @deprecated octokit.teams.addOrUpdateRepo() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy + */ + addOrUpdateRepo: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsAddOrUpdateRepoParams + ): Promise; + + endpoint: Octokit.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://developer.github.com/v3/#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`. + */ + addOrUpdateRepoInOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsAddOrUpdateRepoInOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team repository`](https://developer.github.com/v3/teams/#add-or-update-team-repository) 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://developer.github.com/v3/#http-verbs)." + * @deprecated octokit.teams.addOrUpdateRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy + */ + addOrUpdateRepoLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsAddOrUpdateRepoLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **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 if a team manages a repository`](https://developer.github.com/v3/teams/#check-if-a-team-manages-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://developer.github.com/v3/media/) via the `Accept` header: + * @deprecated octokit.teams.checkManagesRepo() is deprecated, see https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy + */ + checkManagesRepo: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsCheckManagesRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Checks whether a team has `admin`, `push`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. + * + * **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`. + * + * 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://developer.github.com/v3/media/) via the `Accept` header: + */ + checkManagesRepoInOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsCheckManagesRepoInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **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 if a team manages a repository`](https://developer.github.com/v3/teams/#check-if-a-team-manages-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://developer.github.com/v3/media/) via the `Accept` header: + * @deprecated octokit.teams.checkManagesRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy + */ + checkManagesRepoLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsCheckManagesRepoLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://help.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://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)" in the GitHub Help documentation. + */ + create: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsCreateParamsDeprecatedPermission + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.TeamsCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://developer.github.com/v3/teams/discussions/#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * @deprecated octokit.teams.createDiscussion() is deprecated, see https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy + */ + createDiscussion: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsCreateDiscussionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a comment`](https://developer.github.com/v3/teams/discussion_comments/#create-a-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * @deprecated octokit.teams.createDiscussionComment() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy + */ + createDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsCreateDiscussionCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-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?: Octokit.RequestOptions & + Octokit.TeamsCreateDiscussionCommentInOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a comment`](https://developer.github.com/v3/teams/discussion_comments/#create-a-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * @deprecated octokit.teams.createDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy + */ + createDiscussionCommentLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsCreateDiscussionCommentLegacyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-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?: Octokit.RequestOptions & + Octokit.TeamsCreateDiscussionInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://developer.github.com/v3/teams/discussions/#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * @deprecated octokit.teams.createDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy + */ + createDiscussionLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsCreateDiscussionLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete team`](https://developer.github.com/v3/teams/#delete-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. + * @deprecated octokit.teams.delete() is deprecated, see https://developer.github.com/v3/teams/#delete-team-legacy + */ + delete: { + (params?: Octokit.RequestOptions & Octokit.TeamsDeleteParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://developer.github.com/v3/teams/discussions/#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.deleteDiscussion() is deprecated, see https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy + */ + deleteDiscussion: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsDeleteDiscussionParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a comment`](https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.deleteDiscussionComment() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy + */ + deleteDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsDeleteDiscussionCommentParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.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?: Octokit.RequestOptions & + Octokit.TeamsDeleteDiscussionCommentInOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a comment`](https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.deleteDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy + */ + deleteDiscussionCommentLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsDeleteDiscussionCommentLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.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?: Octokit.RequestOptions & + Octokit.TeamsDeleteDiscussionInOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://developer.github.com/v3/teams/discussions/#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.deleteDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy + */ + deleteDiscussionLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsDeleteDiscussionLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id`. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + deleteInOrg: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsDeleteInOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete team`](https://developer.github.com/v3/teams/#delete-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. + * @deprecated octokit.teams.deleteLegacy() is deprecated, see https://developer.github.com/v3/teams/#delete-team-legacy + */ + deleteLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsDeleteLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [`Get team by name`](https://developer.github.com/v3/teams/#get-team-by-name) endpoint. + * @deprecated octokit.teams.get() is deprecated, see https://developer.github.com/v3/teams/#get-team-legacy + */ + get: { + (params?: Octokit.RequestOptions & Octokit.TeamsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.TeamsGetByNameParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get a single discussion`](https://developer.github.com/v3/teams/discussions/#get-a-single-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.getDiscussion() is deprecated, see https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy + */ + getDiscussion: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsGetDiscussionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get a single comment`](https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.getDiscussionComment() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy + */ + getDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsGetDiscussionCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.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?: Octokit.RequestOptions & + Octokit.TeamsGetDiscussionCommentInOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get a single comment`](https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.getDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy + */ + getDiscussionCommentLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsGetDiscussionCommentLegacyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.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?: Octokit.RequestOptions & Octokit.TeamsGetDiscussionInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get a single discussion`](https://developer.github.com/v3/teams/discussions/#get-a-single-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.getDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy + */ + getDiscussionLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsGetDiscussionLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [`Get team by name`](https://developer.github.com/v3/teams/#get-team-by-name) endpoint. + * @deprecated octokit.teams.getLegacy() is deprecated, see https://developer.github.com/v3/teams/#get-team-legacy + */ + getLegacy: { + (params?: Octokit.RequestOptions & Octokit.TeamsGetLegacyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership](https://developer.github.com/v3/teams/members/#get-team-membership) 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. + * @deprecated octokit.teams.getMember() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member-legacy + */ + getMember: { + (params?: Octokit.RequestOptions & Octokit.TeamsGetMemberParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership](https://developer.github.com/v3/teams/members/#get-team-membership) 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. + * @deprecated octokit.teams.getMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member-legacy + */ + getMemberLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsGetMemberLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get team membership`](https://developer.github.com/v3/teams/members/#get-team-membership) 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 `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team). + * @deprecated octokit.teams.getMembership() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-membership-legacy + */ + getMembership: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsGetMembershipParams + ): Promise>; + + endpoint: Octokit.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:** 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 `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team). + */ + getMembershipInOrg: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsGetMembershipInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get team membership`](https://developer.github.com/v3/teams/members/#get-team-membership) 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 `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team). + * @deprecated octokit.teams.getMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-membership-legacy + */ + getMembershipLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsGetMembershipLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all teams in an organization that are visible to the authenticated user. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.TeamsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://developer.github.com/v3/teams/#list-child-teams) endpoint. + * + * + * @deprecated octokit.teams.listChild() is deprecated, see https://developer.github.com/v3/teams/#list-child-teams-legacy + */ + listChild: { + (params?: Octokit.RequestOptions & Octokit.TeamsListChildParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the child teams of the team requested 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?: Octokit.RequestOptions & Octokit.TeamsListChildInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://developer.github.com/v3/teams/#list-child-teams) endpoint. + * + * + * @deprecated octokit.teams.listChildLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-child-teams-legacy + */ + listChildLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsListChildLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List comments`](https://developer.github.com/v3/teams/discussion_comments/#list-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.listDiscussionComments() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy + */ + listDiscussionComments: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsListDiscussionCommentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.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?: Octokit.RequestOptions & + Octokit.TeamsListDiscussionCommentsInOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List comments`](https://developer.github.com/v3/teams/discussion_comments/#list-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.listDiscussionCommentsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy + */ + listDiscussionCommentsLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsListDiscussionCommentsLegacyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://developer.github.com/v3/teams/discussions/#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.listDiscussions() is deprecated, see https://developer.github.com/v3/teams/discussions/#list-discussions-legacy + */ + listDiscussions: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsListDiscussionsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.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?: Octokit.RequestOptions & + Octokit.TeamsListDiscussionsInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://developer.github.com/v3/teams/discussions/#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.listDiscussionsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#list-discussions-legacy + */ + listDiscussionsLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsListDiscussionsLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://developer.github.com/apps/building-oauth-apps/). + */ + listForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsListForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://developer.github.com/v3/teams/members/#list-team-members) endpoint. + * + * Team members will include the members of child teams. + * @deprecated octokit.teams.listMembers() is deprecated, see https://developer.github.com/v3/teams/members/#list-team-members-legacy + */ + listMembers: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsListMembersParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.TeamsListMembersInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://developer.github.com/v3/teams/members/#list-team-members) endpoint. + * + * Team members will include the members of child teams. + * @deprecated octokit.teams.listMembersLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-team-members-legacy + */ + listMembersLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsListMembersLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://developer.github.com/v3/teams/members/#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * @deprecated octokit.teams.listPendingInvitations() is deprecated, see https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy + */ + listPendingInvitations: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsListPendingInvitationsParams + ): Promise>; + + endpoint: Octokit.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`. + * + * **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?: Octokit.RequestOptions & + Octokit.TeamsListPendingInvitationsInOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://developer.github.com/v3/teams/members/#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * @deprecated octokit.teams.listPendingInvitationsLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy + */ + listPendingInvitationsLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsListPendingInvitationsLegacyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://developer.github.com/v3/teams/#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + * @deprecated octokit.teams.listProjects() is deprecated, see https://developer.github.com/v3/teams/#list-team-projects-legacy + */ + listProjects: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsListProjectsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.TeamsListProjectsInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://developer.github.com/v3/teams/#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + * @deprecated octokit.teams.listProjectsLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-projects-legacy + */ + listProjectsLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsListProjectsLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team repos`](https://developer.github.com/v3/teams/#list-team-repos) endpoint. + * @deprecated octokit.teams.listRepos() is deprecated, see https://developer.github.com/v3/teams/#list-team-repos-legacy + */ + listRepos: { + (params?: Octokit.RequestOptions & Octokit.TeamsListReposParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & Octokit.TeamsListReposInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team repos`](https://developer.github.com/v3/teams/#list-team-repos) endpoint. + * @deprecated octokit.teams.listReposLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-repos-legacy + */ + listReposLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsListReposLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership](https://developer.github.com/v3/teams/members/#remove-team-membership) 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://help.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://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * @deprecated octokit.teams.removeMember() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member-legacy + */ + removeMember: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveMemberParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership](https://developer.github.com/v3/teams/members/#remove-team-membership) 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://help.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://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * @deprecated octokit.teams.removeMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member-legacy + */ + removeMemberLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveMemberLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team membership`](https://developer.github.com/v3/teams/members/#remove-team-membership) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * @deprecated octokit.teams.removeMembership() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-membership-legacy + */ + removeMembership: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.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`. + */ + removeMembershipInOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsRemoveMembershipInOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team membership`](https://developer.github.com/v3/teams/members/#remove-team-membership) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * @deprecated octokit.teams.removeMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-membership-legacy + */ + removeMembershipLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsRemoveMembershipLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team project`](https://developer.github.com/v3/teams/#remove-team-project) 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. + * @deprecated octokit.teams.removeProject() is deprecated, see https://developer.github.com/v3/teams/#remove-team-project-legacy + */ + removeProject: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveProjectParams + ): Promise; + + endpoint: Octokit.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. 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?: Octokit.RequestOptions & Octokit.TeamsRemoveProjectInOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team project`](https://developer.github.com/v3/teams/#remove-team-project) 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. + * @deprecated octokit.teams.removeProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-project-legacy + */ + removeProjectLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveProjectLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team repository`](https://developer.github.com/v3/teams/#remove-team-repository) 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. + * @deprecated octokit.teams.removeRepo() is deprecated, see https://developer.github.com/v3/teams/#remove-team-repository-legacy + */ + removeRepo: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/repos/:owner/:repo`. + */ + removeRepoInOrg: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveRepoInOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team repository`](https://developer.github.com/v3/teams/#remove-team-repository) 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. + * @deprecated octokit.teams.removeRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-repository-legacy + */ + removeRepoLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveRepoLegacyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Review a team project`](https://developer.github.com/v3/teams/#review-a-team-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. + * @deprecated octokit.teams.reviewProject() is deprecated, see https://developer.github.com/v3/teams/#review-a-team-project-legacy + */ + reviewProject: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsReviewProjectParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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`. + */ + reviewProjectInOrg: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsReviewProjectInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Review a team project`](https://developer.github.com/v3/teams/#review-a-team-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. + * @deprecated octokit.teams.reviewProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#review-a-team-project-legacy + */ + reviewProjectLegacy: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsReviewProjectLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit team`](https://developer.github.com/v3/teams/#edit-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`. + * @deprecated octokit.teams.update() is deprecated, see https://developer.github.com/v3/teams/#edit-team-legacy + */ + update: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsUpdateParamsDeprecatedPermission + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.TeamsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit a discussion`](https://developer.github.com/v3/teams/discussions/#edit-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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.updateDiscussion() is deprecated, see https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy + */ + updateDiscussion: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsUpdateDiscussionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit a comment`](https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.updateDiscussionComment() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy + */ + updateDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsUpdateDiscussionCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.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?: Octokit.RequestOptions & + Octokit.TeamsUpdateDiscussionCommentInOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit a comment`](https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.updateDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy + */ + updateDiscussionCommentLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsUpdateDiscussionCommentLegacyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.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://developer.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?: Octokit.RequestOptions & + Octokit.TeamsUpdateDiscussionInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit a discussion`](https://developer.github.com/v3/teams/discussions/#edit-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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.teams.updateDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy + */ + updateDiscussionLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsUpdateDiscussionLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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?: Octokit.RequestOptions & + Octokit.TeamsUpdateInOrgParamsDeprecatedPermission + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.TeamsUpdateInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit team`](https://developer.github.com/v3/teams/#edit-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`. + * @deprecated octokit.teams.updateLegacy() is deprecated, see https://developer.github.com/v3/teams/#edit-team-legacy + */ + updateLegacy: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsUpdateLegacyParamsDeprecatedPermission + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.TeamsUpdateLegacyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + users: { + /** + * This endpoint is accessible with the `user` scope. + */ + addEmails: { + (params?: Octokit.RequestOptions & Octokit.UsersAddEmailsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + block: { + (params?: Octokit.RequestOptions & Octokit.UsersBlockParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If the user is blocked: + * + * If the user is not blocked: + */ + checkBlocked: { + ( + params?: Octokit.RequestOptions & Octokit.UsersCheckBlockedParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + checkFollowing: { + ( + params?: Octokit.RequestOptions & Octokit.UsersCheckFollowingParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + checkFollowingForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersCheckFollowingForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + createGpgKey: { + ( + params?: Octokit.RequestOptions & Octokit.UsersCreateGpgKeyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + createPublicKey: { + ( + params?: Octokit.RequestOptions & Octokit.UsersCreatePublicKeyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint is accessible with the `user` scope. + */ + deleteEmails: { + ( + params?: Octokit.RequestOptions & Octokit.UsersDeleteEmailsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deleteGpgKey: { + ( + params?: Octokit.RequestOptions & Octokit.UsersDeleteGpgKeyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deletePublicKey: { + ( + params?: Octokit.RequestOptions & Octokit.UsersDeletePublicKeyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#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?: Octokit.RequestOptions & Octokit.UsersFollowParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists public and private profile information when authenticated through basic auth or OAuth with the `user` scope. + * + * Lists public profile information when authenticated through OAuth without the `user` scope. + */ + getAuthenticated: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.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](https://developer.github.com/v3/users/#response-with-github-plan-information)." + * + * 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://developer.github.com/v3/#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://developer.github.com/v3/users/emails/)". + */ + getByUsername: { + ( + params?: Octokit.RequestOptions & Octokit.UsersGetByUsernameParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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: + */ + getContextForUser: { + ( + params?: Octokit.RequestOptions & Octokit.UsersGetContextForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getGpgKey: { + (params?: Octokit.RequestOptions & Octokit.UsersGetGpgKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getPublicKey: { + ( + params?: Octokit.RequestOptions & Octokit.UsersGetPublicKeyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/v3/#link-header) to get the URL for the next page of users. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.UsersListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the users you've blocked on your personal account. + */ + listBlocked: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. + */ + listEmails: { + ( + params?: Octokit.RequestOptions & Octokit.UsersListEmailsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listFollowersForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersListFollowersForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listFollowersForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersListFollowersForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listFollowingForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersListFollowingForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listFollowingForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersListFollowingForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listGpgKeys: { + ( + params?: Octokit.RequestOptions & Octokit.UsersListGpgKeysParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the GPG keys for a user. This information is accessible by anyone. + */ + listGpgKeysForUser: { + ( + params?: Octokit.RequestOptions & Octokit.UsersListGpgKeysForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists your publicly visible email address, which you can set with the [Toggle primary email visibility](https://developer.github.com/v3/users/emails/#toggle-primary-email-visibility) endpoint. This endpoint is accessible with the `user:email` scope. + */ + listPublicEmails: { + ( + params?: Octokit.RequestOptions & Octokit.UsersListPublicEmailsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * 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://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listPublicKeys: { + ( + params?: Octokit.RequestOptions & Octokit.UsersListPublicKeysParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + */ + listPublicKeysForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersListPublicKeysForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Sets the visibility for your primary email addresses. + */ + togglePrimaryEmailVisibility: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersTogglePrimaryEmailVisibilityParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + unblock: { + (params?: Octokit.RequestOptions & Octokit.UsersUnblockParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + unfollow: { + (params?: Octokit.RequestOptions & Octokit.UsersUnfollowParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **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?: Octokit.RequestOptions & Octokit.UsersUpdateAuthenticatedParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; +} + +export = Octokit; diff --git a/node_modules/@octokit/rest/index.js b/node_modules/@octokit/rest/index.js new file mode 100644 index 00000000..09d0d75c --- /dev/null +++ b/node_modules/@octokit/rest/index.js @@ -0,0 +1,15 @@ +const Octokit = require("./lib/core"); + +const CORE_PLUGINS = [ + require("./plugins/authentication"), + require("./plugins/authentication-deprecated"), // deprecated: remove in v17 + require("./plugins/log"), + require("./plugins/pagination"), + require("./plugins/register-endpoints"), + require("./plugins/rest-api-endpoints"), + require("./plugins/validate"), + + require("octokit-pagination-methods") // deprecated: remove in v17 +]; + +module.exports = Octokit.plugin(CORE_PLUGINS); diff --git a/node_modules/@octokit/rest/lib/constructor.js b/node_modules/@octokit/rest/lib/constructor.js new file mode 100644 index 00000000..d83cf6b4 --- /dev/null +++ b/node_modules/@octokit/rest/lib/constructor.js @@ -0,0 +1,29 @@ +module.exports = Octokit; + +const { request } = require("@octokit/request"); +const Hook = require("before-after-hook"); + +const parseClientOptions = require("./parse-client-options"); + +function Octokit(plugins, options) { + options = options || {}; + const hook = new Hook.Collection(); + const log = Object.assign( + { + debug: () => {}, + info: () => {}, + warn: console.warn, + error: console.error + }, + options && options.log + ); + const api = { + hook, + log, + request: request.defaults(parseClientOptions(options, log, hook)) + }; + + plugins.forEach(pluginFunction => pluginFunction(api, options)); + + return api; +} diff --git a/node_modules/@octokit/rest/lib/core.js b/node_modules/@octokit/rest/lib/core.js new file mode 100644 index 00000000..4943ffad --- /dev/null +++ b/node_modules/@octokit/rest/lib/core.js @@ -0,0 +1,3 @@ +const factory = require("./factory"); + +module.exports = factory(); diff --git a/node_modules/@octokit/rest/lib/factory.js b/node_modules/@octokit/rest/lib/factory.js new file mode 100644 index 00000000..5dc20652 --- /dev/null +++ b/node_modules/@octokit/rest/lib/factory.js @@ -0,0 +1,10 @@ +module.exports = factory; + +const Octokit = require("./constructor"); +const registerPlugin = require("./register-plugin"); + +function factory(plugins) { + const Api = Octokit.bind(null, plugins || []); + Api.plugin = registerPlugin.bind(null, plugins || []); + return Api; +} diff --git a/node_modules/@octokit/rest/lib/parse-client-options.js b/node_modules/@octokit/rest/lib/parse-client-options.js new file mode 100644 index 00000000..c7c097dd --- /dev/null +++ b/node_modules/@octokit/rest/lib/parse-client-options.js @@ -0,0 +1,89 @@ +module.exports = parseOptions; + +const { Deprecation } = require("deprecation"); +const { getUserAgent } = require("universal-user-agent"); +const once = require("once"); + +const pkg = require("../package.json"); + +const deprecateOptionsTimeout = once((log, deprecation) => + log.warn(deprecation) +); +const deprecateOptionsAgent = once((log, deprecation) => log.warn(deprecation)); +const deprecateOptionsHeaders = once((log, deprecation) => + log.warn(deprecation) +); + +function parseOptions(options, log, hook) { + if (options.headers) { + options.headers = Object.keys(options.headers).reduce((newObj, key) => { + newObj[key.toLowerCase()] = options.headers[key]; + return newObj; + }, {}); + } + + const clientDefaults = { + headers: options.headers || {}, + request: options.request || {}, + mediaType: { + previews: [], + format: "" + } + }; + + if (options.baseUrl) { + clientDefaults.baseUrl = options.baseUrl; + } + + if (options.userAgent) { + clientDefaults.headers["user-agent"] = options.userAgent; + } + + if (options.previews) { + clientDefaults.mediaType.previews = options.previews; + } + + if (options.timeZone) { + clientDefaults.headers["time-zone"] = options.timeZone; + } + + if (options.timeout) { + deprecateOptionsTimeout( + log, + new Deprecation( + "[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request" + ) + ); + clientDefaults.request.timeout = options.timeout; + } + + if (options.agent) { + deprecateOptionsAgent( + log, + new Deprecation( + "[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request" + ) + ); + clientDefaults.request.agent = options.agent; + } + + if (options.headers) { + deprecateOptionsHeaders( + log, + new Deprecation( + "[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request" + ) + ); + } + + const userAgentOption = clientDefaults.headers["user-agent"]; + const defaultUserAgent = `octokit.js/${pkg.version} ${getUserAgent()}`; + + clientDefaults.headers["user-agent"] = [userAgentOption, defaultUserAgent] + .filter(Boolean) + .join(" "); + + clientDefaults.request.hook = hook.bind(null, "request"); + + return clientDefaults; +} diff --git a/node_modules/@octokit/rest/lib/register-plugin.js b/node_modules/@octokit/rest/lib/register-plugin.js new file mode 100644 index 00000000..c1ae7754 --- /dev/null +++ b/node_modules/@octokit/rest/lib/register-plugin.js @@ -0,0 +1,9 @@ +module.exports = registerPlugin; + +const factory = require("./factory"); + +function registerPlugin(plugins, pluginFunction) { + return factory( + plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction) + ); +} diff --git a/node_modules/@octokit/rest/package.json b/node_modules/@octokit/rest/package.json new file mode 100644 index 00000000..4c8ecc7d --- /dev/null +++ b/node_modules/@octokit/rest/package.json @@ -0,0 +1,176 @@ +{ + "_args": [ + [ + "@octokit/rest@16.38.3", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@octokit/rest@16.38.3", + "_id": "@octokit/rest@16.38.3", + "_inBundle": false, + "_integrity": "sha512-Ui5W4Gzv0YHe9P3KDZAuU/BkRrT88PCuuATfWBMBf4fux4nB8th8LlyVAVnHKba1s/q4umci+sNHzoFYFujPEg==", + "_location": "/@octokit/rest", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/rest@16.38.3", + "name": "@octokit/rest", + "escapedName": "@octokit%2frest", + "scope": "@octokit", + "rawSpec": "16.38.3", + "saveSpec": null, + "fetchSpec": "16.38.3" + }, + "_requiredBy": [ + "/@actions/github" + ], + "_resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.38.3.tgz", + "_spec": "16.38.3", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "bugs": { + "url": "https://github.com/octokit/rest.js/issues" + }, + "bundlesize": [ + { + "path": "./dist/octokit-rest.min.js.gz", + "maxSize": "33 kB" + } + ], + "contributors": [ + { + "name": "Mike de Boer", + "email": "info@mikedeboer.nl" + }, + { + "name": "Fabian Jakobs", + "email": "fabian@c9.io" + }, + { + "name": "Joe Gallo", + "email": "joe@brassafrax.com" + }, + { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + } + ], + "dependencies": { + "@octokit/auth-token": "^2.4.0", + "@octokit/request": "^5.2.0", + "@octokit/request-error": "^1.0.2", + "atob-lite": "^2.0.0", + "before-after-hook": "^2.0.0", + "btoa-lite": "^1.0.0", + "deprecation": "^2.0.0", + "lodash.get": "^4.4.2", + "lodash.set": "^4.3.2", + "lodash.uniq": "^4.5.0", + "octokit-pagination-methods": "^1.1.0", + "once": "^1.4.0", + "universal-user-agent": "^4.0.0" + }, + "description": "GitHub REST API client for Node.js", + "devDependencies": { + "@gimenete/type-writer": "^0.1.3", + "@octokit/auth": "^1.1.1", + "@octokit/fixtures-server": "^5.0.6", + "@octokit/graphql": "^4.2.0", + "@types/node": "^13.1.0", + "bundlesize": "^0.18.0", + "chai": "^4.1.2", + "compression-webpack-plugin": "^3.1.0", + "cypress": "^3.0.0", + "glob": "^7.1.2", + "http-proxy-agent": "^4.0.0", + "lodash.camelcase": "^4.3.0", + "lodash.merge": "^4.6.1", + "lodash.upperfirst": "^4.3.1", + "mkdirp": "^1.0.0", + "mocha": "^6.0.0", + "mustache": "^4.0.0", + "nock": "^11.3.3", + "npm-run-all": "^4.1.2", + "nyc": "^15.0.0", + "prettier": "^1.14.2", + "proxy": "^1.0.0", + "semantic-release": "^16.0.0", + "sinon": "^8.0.0", + "sinon-chai": "^3.0.0", + "sort-keys": "^4.0.0", + "string-to-arraybuffer": "^1.0.0", + "string-to-jsdoc-comment": "^1.0.0", + "typescript": "^3.3.1", + "webpack": "^4.0.0", + "webpack-bundle-analyzer": "^3.0.0", + "webpack-cli": "^3.0.0" + }, + "files": [ + "index.js", + "index.d.ts", + "lib", + "plugins" + ], + "homepage": "https://github.com/octokit/rest.js#readme", + "keywords": [ + "octokit", + "github", + "rest", + "api-client" + ], + "license": "MIT", + "name": "@octokit/rest", + "nyc": { + "ignore": [ + "test" + ] + }, + "publishConfig": { + "access": "public" + }, + "release": { + "publish": [ + "@semantic-release/npm", + { + "path": "@semantic-release/github", + "assets": [ + "dist/*", + "!dist/*.map.gz" + ] + } + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/rest.js.git" + }, + "scripts": { + "build": "npm-run-all build:*", + "build:browser": "npm-run-all build:browser:*", + "build:browser:development": "webpack --mode development --entry . --output-library=Octokit --output=./dist/octokit-rest.js --profile --json > dist/bundle-stats.json", + "build:browser:production": "webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=Octokit --output-path=./dist --output-filename=octokit-rest.min.js --devtool source-map", + "build:ts": "npm run -s update-endpoints:typescript", + "coverage": "nyc report --reporter=html && open coverage/index.html", + "generate-bundle-report": "webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html", + "lint": "prettier --check '{lib,plugins,scripts,test}/**/*.{js,json,ts}' 'docs/*.{js,json}' 'docs/src/**/*' index.js README.md package.json", + "lint:fix": "prettier --write '{lib,plugins,scripts,test}/**/*.{js,json,ts}' 'docs/*.{js,json}' 'docs/src/**/*' index.js README.md package.json", + "postvalidate:ts": "tsc --noEmit --target es6 test/typescript-validate.ts", + "prebuild:browser": "mkdirp dist/", + "pretest": "npm run -s lint", + "prevalidate:ts": "npm run -s build:ts", + "start-fixtures-server": "octokit-fixtures-server", + "test": "nyc mocha test/mocha-node-setup.js \"test/*/**/*-test.js\"", + "test:browser": "cypress run --browser chrome", + "update-endpoints": "npm-run-all update-endpoints:*", + "update-endpoints:code": "node scripts/update-endpoints/code", + "update-endpoints:fetch-json": "node scripts/update-endpoints/fetch-json", + "update-endpoints:typescript": "node scripts/update-endpoints/typescript", + "validate:ts": "tsc --target es6 --noImplicitAny index.d.ts" + }, + "types": "index.d.ts", + "version": "16.38.3" +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js new file mode 100644 index 00000000..86ce9e95 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js @@ -0,0 +1,52 @@ +module.exports = authenticate; + +const { Deprecation } = require("deprecation"); +const once = require("once"); + +const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); + +function authenticate(state, options) { + deprecateAuthenticate( + state.octokit.log, + new Deprecation( + '[@octokit/rest] octokit.authenticate() is deprecated. Use "auth" constructor option instead.' + ) + ); + + if (!options) { + state.auth = false; + return; + } + + switch (options.type) { + case "basic": + if (!options.username || !options.password) { + throw new Error( + "Basic authentication requires both a username and password to be set" + ); + } + break; + + case "oauth": + if (!options.token && !(options.key && options.secret)) { + throw new Error( + "OAuth2 authentication requires a token or key & secret to be set" + ); + } + break; + + case "token": + case "app": + if (!options.token) { + throw new Error("Token authentication requires a token to be set"); + } + break; + + default: + throw new Error( + "Invalid authentication type, must be 'basic', 'oauth', 'token' or 'app'" + ); + } + + state.auth = options; +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js new file mode 100644 index 00000000..dbb83abd --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js @@ -0,0 +1,43 @@ +module.exports = authenticationBeforeRequest; + +const btoa = require("btoa-lite"); +const uniq = require("lodash.uniq"); + +function authenticationBeforeRequest(state, options) { + if (!state.auth.type) { + return; + } + + if (state.auth.type === "basic") { + const hash = btoa(`${state.auth.username}:${state.auth.password}`); + options.headers.authorization = `Basic ${hash}`; + return; + } + + if (state.auth.type === "token") { + options.headers.authorization = `token ${state.auth.token}`; + return; + } + + if (state.auth.type === "app") { + options.headers.authorization = `Bearer ${state.auth.token}`; + const acceptHeaders = options.headers.accept + .split(",") + .concat("application/vnd.github.machine-man-preview+json"); + options.headers.accept = uniq(acceptHeaders) + .filter(Boolean) + .join(","); + return; + } + + options.url += options.url.indexOf("?") === -1 ? "?" : "&"; + + if (state.auth.token) { + options.url += `access_token=${encodeURIComponent(state.auth.token)}`; + return; + } + + const key = encodeURIComponent(state.auth.key); + const secret = encodeURIComponent(state.auth.secret); + options.url += `client_id=${key}&client_secret=${secret}`; +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js new file mode 100644 index 00000000..7e0cc4f9 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js @@ -0,0 +1,31 @@ +module.exports = authenticationPlugin; + +const { Deprecation } = require("deprecation"); +const once = require("once"); + +const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); + +const authenticate = require("./authenticate"); +const beforeRequest = require("./before-request"); +const requestError = require("./request-error"); + +function authenticationPlugin(octokit, options) { + if (options.auth) { + octokit.authenticate = () => { + deprecateAuthenticate( + octokit.log, + new Deprecation( + '[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor' + ) + ); + }; + return; + } + const state = { + octokit, + auth: false + }; + octokit.authenticate = authenticate.bind(null, state); + octokit.hook.before("request", beforeRequest.bind(null, state)); + octokit.hook.error("request", requestError.bind(null, state)); +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js new file mode 100644 index 00000000..d2e7baae --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js @@ -0,0 +1,55 @@ +module.exports = authenticationRequestError; + +const { RequestError } = require("@octokit/request-error"); + +function authenticationRequestError(state, error, options) { + /* istanbul ignore next */ + if (!error.headers) throw error; + + const otpRequired = /required/.test(error.headers["x-github-otp"] || ""); + // handle "2FA required" error only + if (error.status !== 401 || !otpRequired) { + throw error; + } + + if ( + error.status === 401 && + otpRequired && + error.request && + error.request.headers["x-github-otp"] + ) { + throw new RequestError( + "Invalid one-time password for two-factor authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + if (typeof state.auth.on2fa !== "function") { + throw new RequestError( + "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + return Promise.resolve() + .then(() => { + return state.auth.on2fa(); + }) + .then(oneTimePassword => { + const newOptions = Object.assign(options, { + headers: Object.assign( + { "x-github-otp": oneTimePassword }, + options.headers + ) + }); + return state.octokit.request(newOptions); + }); +} diff --git a/node_modules/@octokit/rest/plugins/authentication/before-request.js b/node_modules/@octokit/rest/plugins/authentication/before-request.js new file mode 100644 index 00000000..aae5daaa --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/before-request.js @@ -0,0 +1,53 @@ +module.exports = authenticationBeforeRequest; + +const btoa = require("btoa-lite"); + +const withAuthorizationPrefix = require("./with-authorization-prefix"); + +function authenticationBeforeRequest(state, options) { + if (typeof state.auth === "string") { + options.headers.authorization = withAuthorizationPrefix(state.auth); + return; + } + + if (state.auth.username) { + const hash = btoa(`${state.auth.username}:${state.auth.password}`); + options.headers.authorization = `Basic ${hash}`; + if (state.otp) { + options.headers["x-github-otp"] = state.otp; + } + return; + } + + if (state.auth.clientId) { + // There is a special case for OAuth applications, when `clientId` and `clientSecret` is passed as + // Basic Authorization instead of query parameters. The only routes where that applies share the same + // URL though: `/applications/:client_id/tokens/:access_token`. + // + // 1. [Check an authorization](https://developer.github.com/v3/oauth_authorizations/#check-an-authorization) + // 2. [Reset an authorization](https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization) + // 3. [Revoke an authorization for an application](https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application) + // + // We identify by checking the URL. It must merge both "/applications/:client_id/tokens/:access_token" + // as well as "/applications/123/tokens/token456" + if (/\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/.test(options.url)) { + const hash = btoa(`${state.auth.clientId}:${state.auth.clientSecret}`); + options.headers.authorization = `Basic ${hash}`; + return; + } + + options.url += options.url.indexOf("?") === -1 ? "?" : "&"; + options.url += `client_id=${state.auth.clientId}&client_secret=${state.auth.clientSecret}`; + return; + } + + return Promise.resolve() + + .then(() => { + return state.auth(); + }) + + .then(authorization => { + options.headers.authorization = withAuthorizationPrefix(authorization); + }); +} diff --git a/node_modules/@octokit/rest/plugins/authentication/index.js b/node_modules/@octokit/rest/plugins/authentication/index.js new file mode 100644 index 00000000..6dcb8597 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/index.js @@ -0,0 +1,76 @@ +module.exports = authenticationPlugin; + +const { createTokenAuth } = require("@octokit/auth-token"); +const { Deprecation } = require("deprecation"); +const once = require("once"); + +const beforeRequest = require("./before-request"); +const requestError = require("./request-error"); +const validate = require("./validate"); +const withAuthorizationPrefix = require("./with-authorization-prefix"); + +const deprecateAuthBasic = once((log, deprecation) => log.warn(deprecation)); +const deprecateAuthObject = once((log, deprecation) => log.warn(deprecation)); + +function authenticationPlugin(octokit, options) { + // If `options.authStrategy` is set then use it and pass in `options.auth` + if (options.authStrategy) { + const auth = options.authStrategy(options.auth); + octokit.hook.wrap("request", auth.hook); + octokit.auth = auth; + return; + } + + // If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance + // is unauthenticated. The `octokit.auth()` method is a no-op and no request hook is registred. + if (!options.auth) { + octokit.auth = () => + Promise.resolve({ + type: "unauthenticated" + }); + return; + } + + const isBasicAuthString = + typeof options.auth === "string" && + /^basic/.test(withAuthorizationPrefix(options.auth)); + + // If only `options.auth` is set to a string, use the default token authentication strategy. + if (typeof options.auth === "string" && !isBasicAuthString) { + const auth = createTokenAuth(options.auth); + octokit.hook.wrap("request", auth.hook); + octokit.auth = auth; + return; + } + + // Otherwise log a deprecation message + const [deprecationMethod, deprecationMessapge] = isBasicAuthString + ? [ + deprecateAuthBasic, + 'Setting the "new Octokit({ auth })" option to a Basic Auth string is deprecated. Use https://github.com/octokit/auth-basic.js instead. See (https://octokit.github.io/rest.js/#authentication)' + ] + : [ + deprecateAuthObject, + 'Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17. See (https://octokit.github.io/rest.js/#authentication)' + ]; + deprecationMethod( + octokit.log, + new Deprecation("[@octokit/rest] " + deprecationMessapge) + ); + + octokit.auth = () => + Promise.resolve({ + type: "deprecated", + message: deprecationMessapge + }); + + validate(options.auth); + + const state = { + octokit, + auth: options.auth + }; + + octokit.hook.before("request", beforeRequest.bind(null, state)); + octokit.hook.error("request", requestError.bind(null, state)); +} diff --git a/node_modules/@octokit/rest/plugins/authentication/request-error.js b/node_modules/@octokit/rest/plugins/authentication/request-error.js new file mode 100644 index 00000000..9c67d550 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/request-error.js @@ -0,0 +1,61 @@ +module.exports = authenticationRequestError; + +const { RequestError } = require("@octokit/request-error"); + +function authenticationRequestError(state, error, options) { + if (!error.headers) throw error; + + const otpRequired = /required/.test(error.headers["x-github-otp"] || ""); + // handle "2FA required" error only + if (error.status !== 401 || !otpRequired) { + throw error; + } + + if ( + error.status === 401 && + otpRequired && + error.request && + error.request.headers["x-github-otp"] + ) { + if (state.otp) { + delete state.otp; // no longer valid, request again + } else { + throw new RequestError( + "Invalid one-time password for two-factor authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + } + + if (typeof state.auth.on2fa !== "function") { + throw new RequestError( + "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + return Promise.resolve() + .then(() => { + return state.auth.on2fa(); + }) + .then(oneTimePassword => { + const newOptions = Object.assign(options, { + headers: Object.assign(options.headers, { + "x-github-otp": oneTimePassword + }) + }); + return state.octokit.request(newOptions).then(response => { + // If OTP still valid, then persist it for following requests + state.otp = oneTimePassword; + return response; + }); + }); +} diff --git a/node_modules/@octokit/rest/plugins/authentication/validate.js b/node_modules/@octokit/rest/plugins/authentication/validate.js new file mode 100644 index 00000000..abf83779 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/validate.js @@ -0,0 +1,21 @@ +module.exports = validateAuth; + +function validateAuth(auth) { + if (typeof auth === "string") { + return; + } + + if (typeof auth === "function") { + return; + } + + if (auth.username && auth.password) { + return; + } + + if (auth.clientId && auth.clientSecret) { + return; + } + + throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`); +} diff --git a/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js b/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js new file mode 100644 index 00000000..122cab73 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js @@ -0,0 +1,23 @@ +module.exports = withAuthorizationPrefix; + +const atob = require("atob-lite"); + +const REGEX_IS_BASIC_AUTH = /^[\w-]+:/; + +function withAuthorizationPrefix(authorization) { + if (/^(basic|bearer|token) /i.test(authorization)) { + return authorization; + } + + try { + if (REGEX_IS_BASIC_AUTH.test(atob(authorization))) { + return `basic ${authorization}`; + } + } catch (error) {} + + if (authorization.split(/\./).length === 3) { + return `bearer ${authorization}`; + } + + return `token ${authorization}`; +} diff --git a/node_modules/@octokit/rest/plugins/log/index.js b/node_modules/@octokit/rest/plugins/log/index.js new file mode 100644 index 00000000..fed446a4 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/log/index.js @@ -0,0 +1,28 @@ +module.exports = octokitDebug; + +function octokitDebug(octokit) { + octokit.hook.wrap("request", (request, options) => { + octokit.log.debug("request", options); + const start = Date.now(); + const requestOptions = octokit.request.endpoint.parse(options); + const path = requestOptions.url.replace(options.baseUrl, ""); + + return request(options) + .then(response => { + octokit.log.info( + `${requestOptions.method} ${path} - ${ + response.status + } in ${Date.now() - start}ms` + ); + return response; + }) + + .catch(error => { + octokit.log.info( + `${requestOptions.method} ${path} - ${error.status} in ${Date.now() - + start}ms` + ); + throw error; + }); + }); +} diff --git a/node_modules/@octokit/rest/plugins/pagination/index.js b/node_modules/@octokit/rest/plugins/pagination/index.js new file mode 100644 index 00000000..e7673bc7 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/index.js @@ -0,0 +1,9 @@ +module.exports = paginatePlugin; + +const iterator = require("./iterator"); +const paginate = require("./paginate"); + +function paginatePlugin(octokit) { + octokit.paginate = paginate.bind(null, octokit); + octokit.paginate.iterator = iterator.bind(null, octokit); +} diff --git a/node_modules/@octokit/rest/plugins/pagination/iterator.js b/node_modules/@octokit/rest/plugins/pagination/iterator.js new file mode 100644 index 00000000..00ea8ebb --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/iterator.js @@ -0,0 +1,34 @@ +module.exports = iterator; + +const normalizePaginatedListResponse = require("./normalize-paginated-list-response"); + +function iterator(octokit, options) { + const headers = options.headers; + let url = octokit.request.endpoint(options).url; + + return { + [Symbol.asyncIterator]: () => ({ + next() { + if (!url) { + return Promise.resolve({ done: true }); + } + + return octokit + .request({ url, headers }) + + .then(response => { + normalizePaginatedListResponse(octokit, url, 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 = ((response.headers.link || "").match( + /<([^>]+)>;\s*rel="next"/ + ) || [])[1]; + + return { value: response }; + }); + } + }) + }; +} diff --git a/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js b/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js new file mode 100644 index 00000000..e664142a --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js @@ -0,0 +1,116 @@ +/** + * 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: + * + * - https://developer.github.com/v3/search/#example (key `items`) + * - https://developer.github.com/v3/checks/runs/#response-3 (key: `check_runs`) + * - https://developer.github.com/v3/checks/suites/#response-1 (key: `check_suites`) + * - https://developer.github.com/v3/apps/installations/#list-repositories (key: `repositories`) + * - https://developer.github.com/v3/apps/installations/#list-installations-for-a-user (key `installations`) + * - https://developer.github.com/v3/orgs/#list-installations-for-an-organization (key `installations`) + * + * 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. For the exceptions with the namespace, a fallback check for the route + * paths has to be added in order to normalize the response. We cannot check for the total_count + * property because it also exists in the response of Get the combined status for a specific ref. + */ + +module.exports = normalizePaginatedListResponse; + +const { Deprecation } = require("deprecation"); +const once = require("once"); + +const deprecateIncompleteResults = once((log, deprecation) => + log.warn(deprecation) +); +const deprecateTotalCount = once((log, deprecation) => log.warn(deprecation)); +const deprecateNamespace = once((log, deprecation) => log.warn(deprecation)); + +const REGEX_IS_SEARCH_PATH = /^\/search\//; +const REGEX_IS_CHECKS_PATH = /^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)/; +const REGEX_IS_INSTALLATION_REPOSITORIES_PATH = /^\/installation\/repositories/; +const REGEX_IS_USER_INSTALLATIONS_PATH = /^\/user\/installations/; +const REGEX_IS_ORG_INSTALLATIONS_PATH = /^\/orgs\/[^/]+\/installations/; + +function normalizePaginatedListResponse(octokit, url, response) { + const path = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, ""); + if ( + !REGEX_IS_SEARCH_PATH.test(path) && + !REGEX_IS_CHECKS_PATH.test(path) && + !REGEX_IS_INSTALLATION_REPOSITORIES_PATH.test(path) && + !REGEX_IS_USER_INSTALLATIONS_PATH.test(path) && + !REGEX_IS_ORG_INSTALLATIONS_PATH.test(path) + ) { + return; + } + + // keep the additional properties intact to avoid a breaking change, + // but log a deprecation warning when accessed + 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]; + + response.data = response.data[namespaceKey]; + + Object.defineProperty(response.data, namespaceKey, { + get() { + deprecateNamespace( + octokit.log, + new Deprecation( + `[@octokit/rest] "result.data.${namespaceKey}" is deprecated. Use "result.data" instead` + ) + ); + return response.data; + } + }); + + if (typeof incompleteResults !== "undefined") { + Object.defineProperty(response.data, "incomplete_results", { + get() { + deprecateIncompleteResults( + octokit.log, + new Deprecation( + '[@octokit/rest] "result.data.incomplete_results" is deprecated.' + ) + ); + return incompleteResults; + } + }); + } + + if (typeof repositorySelection !== "undefined") { + Object.defineProperty(response.data, "repository_selection", { + get() { + deprecateTotalCount( + octokit.log, + new Deprecation( + '[@octokit/rest] "result.data.repository_selection" is deprecated.' + ) + ); + return repositorySelection; + } + }); + } + + Object.defineProperty(response.data, "total_count", { + get() { + deprecateTotalCount( + octokit.log, + new Deprecation( + '[@octokit/rest] "result.data.total_count" is deprecated.' + ) + ); + return totalCount; + } + }); +} diff --git a/node_modules/@octokit/rest/plugins/pagination/paginate.js b/node_modules/@octokit/rest/plugins/pagination/paginate.js new file mode 100644 index 00000000..db4752b4 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/paginate.js @@ -0,0 +1,40 @@ +module.exports = paginate; + +const iterator = require("./iterator"); + +function paginate(octokit, route, options, mapFn) { + if (typeof options === "function") { + mapFn = options; + options = undefined; + } + options = octokit.request.endpoint.merge(route, options); + return gather( + octokit, + [], + iterator(octokit, options)[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/rest/plugins/register-endpoints/index.js b/node_modules/@octokit/rest/plugins/register-endpoints/index.js new file mode 100644 index 00000000..8b92538a --- /dev/null +++ b/node_modules/@octokit/rest/plugins/register-endpoints/index.js @@ -0,0 +1,7 @@ +module.exports = octokitRegisterEndpoints; + +const registerEndpoints = require("./register-endpoints"); + +function octokitRegisterEndpoints(octokit) { + octokit.registerEndpoints = registerEndpoints.bind(null, octokit); +} diff --git a/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js b/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js new file mode 100644 index 00000000..153d4d1e --- /dev/null +++ b/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js @@ -0,0 +1,101 @@ +module.exports = registerEndpoints; + +const { Deprecation } = require("deprecation"); + +function registerEndpoints(octokit, routes) { + Object.keys(routes).forEach(namespaceName => { + if (!octokit[namespaceName]) { + octokit[namespaceName] = {}; + } + + Object.keys(routes[namespaceName]).forEach(apiName => { + const apiOptions = routes[namespaceName][apiName]; + + const endpointDefaults = ["method", "url", "headers"].reduce( + (map, key) => { + if (typeof apiOptions[key] !== "undefined") { + map[key] = apiOptions[key]; + } + + return map; + }, + {} + ); + + endpointDefaults.request = { + validate: apiOptions.params + }; + + let request = octokit.request.defaults(endpointDefaults); + + // patch request & endpoint methods to support deprecated parameters. + // Not the most elegant solution, but we don’t want to move deprecation + // logic into octokit/endpoint.js as it’s out of scope + const hasDeprecatedParam = Object.keys(apiOptions.params || {}).find( + key => apiOptions.params[key].deprecated + ); + if (hasDeprecatedParam) { + const patch = patchForDeprecation.bind(null, octokit, apiOptions); + request = patch( + octokit.request.defaults(endpointDefaults), + `.${namespaceName}.${apiName}()` + ); + request.endpoint = patch( + request.endpoint, + `.${namespaceName}.${apiName}.endpoint()` + ); + request.endpoint.merge = patch( + request.endpoint.merge, + `.${namespaceName}.${apiName}.endpoint.merge()` + ); + } + + if (apiOptions.deprecated) { + octokit[namespaceName][apiName] = Object.assign( + function deprecatedEndpointMethod() { + octokit.log.warn( + new Deprecation(`[@octokit/rest] ${apiOptions.deprecated}`) + ); + octokit[namespaceName][apiName] = request; + return request.apply(null, arguments); + }, + request + ); + + return; + } + + octokit[namespaceName][apiName] = request; + }); + }); +} + +function patchForDeprecation(octokit, apiOptions, method, methodName) { + const patchedMethod = options => { + options = Object.assign({}, options); + + Object.keys(options).forEach(key => { + if (apiOptions.params[key] && apiOptions.params[key].deprecated) { + const aliasKey = apiOptions.params[key].alias; + + octokit.log.warn( + new Deprecation( + `[@octokit/rest] "${key}" parameter is deprecated for "${methodName}". Use "${aliasKey}" instead` + ) + ); + + if (!(aliasKey in options)) { + options[aliasKey] = options[key]; + } + delete options[key]; + } + }); + + return method(options); + }; + Object.keys(method).forEach(key => { + patchedMethod[key] = method[key]; + }); + + return patchedMethod; +} diff --git a/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js b/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js new file mode 100644 index 00000000..4835ceec --- /dev/null +++ b/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js @@ -0,0 +1,13 @@ +module.exports = octokitRestApiEndpoints; + +const ROUTES = require("./routes.json"); + +function octokitRestApiEndpoints(octokit) { + // Aliasing scopes for backward compatibility + // See https://github.com/octokit/rest.js/pull/1134 + ROUTES.gitdata = ROUTES.git; + ROUTES.authorization = ROUTES.oauthAuthorizations; + ROUTES.pullRequests = ROUTES.pulls; + + octokit.registerEndpoints(ROUTES); +} diff --git a/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json b/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json new file mode 100644 index 00000000..bcbeb6d6 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json @@ -0,0 +1,6755 @@ +{ + "activity": { + "checkStarringRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/user/starred/:owner/:repo" + }, + "deleteRepoSubscription": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/subscription" + }, + "deleteThreadSubscription": { + "method": "DELETE", + "params": { "thread_id": { "required": true, "type": "integer" } }, + "url": "/notifications/threads/:thread_id/subscription" + }, + "getRepoSubscription": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/subscription" + }, + "getThread": { + "method": "GET", + "params": { "thread_id": { "required": true, "type": "integer" } }, + "url": "/notifications/threads/:thread_id" + }, + "getThreadSubscription": { + "method": "GET", + "params": { "thread_id": { "required": true, "type": "integer" } }, + "url": "/notifications/threads/:thread_id/subscription" + }, + "listEventsForOrg": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/events/orgs/:org" + }, + "listEventsForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/events" + }, + "listFeeds": { "method": "GET", "params": {}, "url": "/feeds" }, + "listNotifications": { + "method": "GET", + "params": { + "all": { "type": "boolean" }, + "before": { "type": "string" }, + "page": { "type": "integer" }, + "participating": { "type": "boolean" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/notifications" + }, + "listNotificationsForRepo": { + "method": "GET", + "params": { + "all": { "type": "boolean" }, + "before": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "participating": { "type": "boolean" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" } + }, + "url": "/repos/:owner/:repo/notifications" + }, + "listPublicEvents": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/events" + }, + "listPublicEventsForOrg": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/events" + }, + "listPublicEventsForRepoNetwork": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/networks/:owner/:repo/events" + }, + "listPublicEventsForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/events/public" + }, + "listReceivedEventsForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/received_events" + }, + "listReceivedPublicEventsForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/received_events/public" + }, + "listRepoEvents": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/events" + }, + "listReposStarredByAuthenticatedUser": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/user/starred" + }, + "listReposStarredByUser": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "sort": { "enum": ["created", "updated"], "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/starred" + }, + "listReposWatchedByUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/subscriptions" + }, + "listStargazersForRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stargazers" + }, + "listWatchedReposForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/subscriptions" + }, + "listWatchersForRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/subscribers" + }, + "markAsRead": { + "method": "PUT", + "params": { "last_read_at": { "type": "string" } }, + "url": "/notifications" + }, + "markNotificationsAsReadForRepo": { + "method": "PUT", + "params": { + "last_read_at": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/notifications" + }, + "markThreadAsRead": { + "method": "PATCH", + "params": { "thread_id": { "required": true, "type": "integer" } }, + "url": "/notifications/threads/:thread_id" + }, + "setRepoSubscription": { + "method": "PUT", + "params": { + "ignored": { "type": "boolean" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "subscribed": { "type": "boolean" } + }, + "url": "/repos/:owner/:repo/subscription" + }, + "setThreadSubscription": { + "method": "PUT", + "params": { + "ignored": { "type": "boolean" }, + "thread_id": { "required": true, "type": "integer" } + }, + "url": "/notifications/threads/:thread_id/subscription" + }, + "starRepo": { + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/user/starred/:owner/:repo" + }, + "unstarRepo": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/user/starred/:owner/:repo" + } + }, + "apps": { + "addRepoToInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "PUT", + "params": { + "installation_id": { "required": true, "type": "integer" }, + "repository_id": { "required": true, "type": "integer" } + }, + "url": "/user/installations/:installation_id/repositories/:repository_id" + }, + "checkAccountIsAssociatedWithAny": { + "method": "GET", + "params": { + "account_id": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/marketplace_listing/accounts/:account_id" + }, + "checkAccountIsAssociatedWithAnyStubbed": { + "method": "GET", + "params": { + "account_id": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/marketplace_listing/stubbed/accounts/:account_id" + }, + "checkAuthorization": { + "deprecated": "octokit.apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization", + "method": "GET", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "checkToken": { + "headers": { + "accept": "application/vnd.github.doctor-strange-preview+json" + }, + "method": "POST", + "params": { + "access_token": { "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/token" + }, + "createContentAttachment": { + "headers": { "accept": "application/vnd.github.corsair-preview+json" }, + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "content_reference_id": { "required": true, "type": "integer" }, + "title": { "required": true, "type": "string" } + }, + "url": "/content_references/:content_reference_id/attachments" + }, + "createFromManifest": { + "headers": { "accept": "application/vnd.github.fury-preview+json" }, + "method": "POST", + "params": { "code": { "required": true, "type": "string" } }, + "url": "/app-manifests/:code/conversions" + }, + "createInstallationToken": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "POST", + "params": { + "installation_id": { "required": true, "type": "integer" }, + "permissions": { "type": "object" }, + "repository_ids": { "type": "integer[]" } + }, + "url": "/app/installations/:installation_id/access_tokens" + }, + "deleteAuthorization": { + "headers": { + "accept": "application/vnd.github.doctor-strange-preview+json" + }, + "method": "DELETE", + "params": { + "access_token": { "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/grant" + }, + "deleteInstallation": { + "headers": { + "accept": "application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json" + }, + "method": "DELETE", + "params": { "installation_id": { "required": true, "type": "integer" } }, + "url": "/app/installations/:installation_id" + }, + "deleteToken": { + "headers": { + "accept": "application/vnd.github.doctor-strange-preview+json" + }, + "method": "DELETE", + "params": { + "access_token": { "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/token" + }, + "findOrgInstallation": { + "deprecated": "octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10)", + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org/installation" + }, + "findRepoInstallation": { + "deprecated": "octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10)", + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/installation" + }, + "findUserInstallation": { + "deprecated": "octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10)", + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/users/:username/installation" + }, + "getAuthenticated": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": {}, + "url": "/app" + }, + "getBySlug": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "app_slug": { "required": true, "type": "string" } }, + "url": "/apps/:app_slug" + }, + "getInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "installation_id": { "required": true, "type": "integer" } }, + "url": "/app/installations/:installation_id" + }, + "getOrgInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org/installation" + }, + "getRepoInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/installation" + }, + "getUserInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/users/:username/installation" + }, + "listAccountsUserOrOrgOnPlan": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "plan_id": { "required": true, "type": "integer" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/marketplace_listing/plans/:plan_id/accounts" + }, + "listAccountsUserOrOrgOnPlanStubbed": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "plan_id": { "required": true, "type": "integer" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/marketplace_listing/stubbed/plans/:plan_id/accounts" + }, + "listInstallationReposForAuthenticatedUser": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "installation_id": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/installations/:installation_id/repositories" + }, + "listInstallations": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/app/installations" + }, + "listInstallationsForAuthenticatedUser": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/installations" + }, + "listMarketplacePurchasesForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/marketplace_purchases" + }, + "listMarketplacePurchasesForAuthenticatedUserStubbed": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/marketplace_purchases/stubbed" + }, + "listPlans": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/marketplace_listing/plans" + }, + "listPlansStubbed": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/marketplace_listing/stubbed/plans" + }, + "listRepos": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/installation/repositories" + }, + "removeRepoFromInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "DELETE", + "params": { + "installation_id": { "required": true, "type": "integer" }, + "repository_id": { "required": true, "type": "integer" } + }, + "url": "/user/installations/:installation_id/repositories/:repository_id" + }, + "resetAuthorization": { + "deprecated": "octokit.apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization", + "method": "POST", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "resetToken": { + "headers": { + "accept": "application/vnd.github.doctor-strange-preview+json" + }, + "method": "PATCH", + "params": { + "access_token": { "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/token" + }, + "revokeAuthorizationForApplication": { + "deprecated": "octokit.apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application", + "method": "DELETE", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "revokeGrantForApplication": { + "deprecated": "octokit.apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application", + "method": "DELETE", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/grants/:access_token" + }, + "revokeInstallationToken": { + "headers": { "accept": "application/vnd.github.gambit-preview+json" }, + "method": "DELETE", + "params": {}, + "url": "/installation/token" + } + }, + "checks": { + "create": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "POST", + "params": { + "actions": { "type": "object[]" }, + "actions[].description": { "required": true, "type": "string" }, + "actions[].identifier": { "required": true, "type": "string" }, + "actions[].label": { "required": true, "type": "string" }, + "completed_at": { "type": "string" }, + "conclusion": { + "enum": [ + "success", + "failure", + "neutral", + "cancelled", + "timed_out", + "action_required" + ], + "type": "string" + }, + "details_url": { "type": "string" }, + "external_id": { "type": "string" }, + "head_sha": { "required": true, "type": "string" }, + "name": { "required": true, "type": "string" }, + "output": { "type": "object" }, + "output.annotations": { "type": "object[]" }, + "output.annotations[].annotation_level": { + "enum": ["notice", "warning", "failure"], + "required": true, + "type": "string" + }, + "output.annotations[].end_column": { "type": "integer" }, + "output.annotations[].end_line": { + "required": true, + "type": "integer" + }, + "output.annotations[].message": { "required": true, "type": "string" }, + "output.annotations[].path": { "required": true, "type": "string" }, + "output.annotations[].raw_details": { "type": "string" }, + "output.annotations[].start_column": { "type": "integer" }, + "output.annotations[].start_line": { + "required": true, + "type": "integer" + }, + "output.annotations[].title": { "type": "string" }, + "output.images": { "type": "object[]" }, + "output.images[].alt": { "required": true, "type": "string" }, + "output.images[].caption": { "type": "string" }, + "output.images[].image_url": { "required": true, "type": "string" }, + "output.summary": { "required": true, "type": "string" }, + "output.text": { "type": "string" }, + "output.title": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "started_at": { "type": "string" }, + "status": { + "enum": ["queued", "in_progress", "completed"], + "type": "string" + } + }, + "url": "/repos/:owner/:repo/check-runs" + }, + "createSuite": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "POST", + "params": { + "head_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-suites" + }, + "get": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "check_run_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-runs/:check_run_id" + }, + "getSuite": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "check_suite_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-suites/:check_suite_id" + }, + "listAnnotations": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "check_run_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-runs/:check_run_id/annotations" + }, + "listForRef": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "check_name": { "type": "string" }, + "filter": { "enum": ["latest", "all"], "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "status": { + "enum": ["queued", "in_progress", "completed"], + "type": "string" + } + }, + "url": "/repos/:owner/:repo/commits/:ref/check-runs" + }, + "listForSuite": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "check_name": { "type": "string" }, + "check_suite_id": { "required": true, "type": "integer" }, + "filter": { "enum": ["latest", "all"], "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "status": { + "enum": ["queued", "in_progress", "completed"], + "type": "string" + } + }, + "url": "/repos/:owner/:repo/check-suites/:check_suite_id/check-runs" + }, + "listSuitesForRef": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "app_id": { "type": "integer" }, + "check_name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:ref/check-suites" + }, + "rerequestSuite": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "POST", + "params": { + "check_suite_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-suites/:check_suite_id/rerequest" + }, + "setSuitesPreferences": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "PATCH", + "params": { + "auto_trigger_checks": { "type": "object[]" }, + "auto_trigger_checks[].app_id": { "required": true, "type": "integer" }, + "auto_trigger_checks[].setting": { + "required": true, + "type": "boolean" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-suites/preferences" + }, + "update": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "PATCH", + "params": { + "actions": { "type": "object[]" }, + "actions[].description": { "required": true, "type": "string" }, + "actions[].identifier": { "required": true, "type": "string" }, + "actions[].label": { "required": true, "type": "string" }, + "check_run_id": { "required": true, "type": "integer" }, + "completed_at": { "type": "string" }, + "conclusion": { + "enum": [ + "success", + "failure", + "neutral", + "cancelled", + "timed_out", + "action_required" + ], + "type": "string" + }, + "details_url": { "type": "string" }, + "external_id": { "type": "string" }, + "name": { "type": "string" }, + "output": { "type": "object" }, + "output.annotations": { "type": "object[]" }, + "output.annotations[].annotation_level": { + "enum": ["notice", "warning", "failure"], + "required": true, + "type": "string" + }, + "output.annotations[].end_column": { "type": "integer" }, + "output.annotations[].end_line": { + "required": true, + "type": "integer" + }, + "output.annotations[].message": { "required": true, "type": "string" }, + "output.annotations[].path": { "required": true, "type": "string" }, + "output.annotations[].raw_details": { "type": "string" }, + "output.annotations[].start_column": { "type": "integer" }, + "output.annotations[].start_line": { + "required": true, + "type": "integer" + }, + "output.annotations[].title": { "type": "string" }, + "output.images": { "type": "object[]" }, + "output.images[].alt": { "required": true, "type": "string" }, + "output.images[].caption": { "type": "string" }, + "output.images[].image_url": { "required": true, "type": "string" }, + "output.summary": { "required": true, "type": "string" }, + "output.text": { "type": "string" }, + "output.title": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "started_at": { "type": "string" }, + "status": { + "enum": ["queued", "in_progress", "completed"], + "type": "string" + } + }, + "url": "/repos/:owner/:repo/check-runs/:check_run_id" + } + }, + "codesOfConduct": { + "getConductCode": { + "headers": { + "accept": "application/vnd.github.scarlet-witch-preview+json" + }, + "method": "GET", + "params": { "key": { "required": true, "type": "string" } }, + "url": "/codes_of_conduct/:key" + }, + "getForRepo": { + "headers": { + "accept": "application/vnd.github.scarlet-witch-preview+json" + }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/community/code_of_conduct" + }, + "listConductCodes": { + "headers": { + "accept": "application/vnd.github.scarlet-witch-preview+json" + }, + "method": "GET", + "params": {}, + "url": "/codes_of_conduct" + } + }, + "emojis": { "get": { "method": "GET", "params": {}, "url": "/emojis" } }, + "gists": { + "checkIsStarred": { + "method": "GET", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id/star" + }, + "create": { + "method": "POST", + "params": { + "description": { "type": "string" }, + "files": { "required": true, "type": "object" }, + "files.content": { "type": "string" }, + "public": { "type": "boolean" } + }, + "url": "/gists" + }, + "createComment": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "gist_id": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id/comments" + }, + "delete": { + "method": "DELETE", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id" + }, + "deleteComment": { + "method": "DELETE", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "gist_id": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id/comments/:comment_id" + }, + "fork": { + "method": "POST", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id/forks" + }, + "get": { + "method": "GET", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id" + }, + "getComment": { + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "gist_id": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id/comments/:comment_id" + }, + "getRevision": { + "method": "GET", + "params": { + "gist_id": { "required": true, "type": "string" }, + "sha": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id/:sha" + }, + "list": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/gists" + }, + "listComments": { + "method": "GET", + "params": { + "gist_id": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/gists/:gist_id/comments" + }, + "listCommits": { + "method": "GET", + "params": { + "gist_id": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/gists/:gist_id/commits" + }, + "listForks": { + "method": "GET", + "params": { + "gist_id": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/gists/:gist_id/forks" + }, + "listPublic": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/gists/public" + }, + "listPublicForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/gists" + }, + "listStarred": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/gists/starred" + }, + "star": { + "method": "PUT", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id/star" + }, + "unstar": { + "method": "DELETE", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id/star" + }, + "update": { + "method": "PATCH", + "params": { + "description": { "type": "string" }, + "files": { "type": "object" }, + "files.content": { "type": "string" }, + "files.filename": { "type": "string" }, + "gist_id": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id" + }, + "updateComment": { + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_id": { "required": true, "type": "integer" }, + "gist_id": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id/comments/:comment_id" + } + }, + "git": { + "createBlob": { + "method": "POST", + "params": { + "content": { "required": true, "type": "string" }, + "encoding": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/blobs" + }, + "createCommit": { + "method": "POST", + "params": { + "author": { "type": "object" }, + "author.date": { "type": "string" }, + "author.email": { "type": "string" }, + "author.name": { "type": "string" }, + "committer": { "type": "object" }, + "committer.date": { "type": "string" }, + "committer.email": { "type": "string" }, + "committer.name": { "type": "string" }, + "message": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "parents": { "required": true, "type": "string[]" }, + "repo": { "required": true, "type": "string" }, + "signature": { "type": "string" }, + "tree": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/commits" + }, + "createRef": { + "method": "POST", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/refs" + }, + "createTag": { + "method": "POST", + "params": { + "message": { "required": true, "type": "string" }, + "object": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "tag": { "required": true, "type": "string" }, + "tagger": { "type": "object" }, + "tagger.date": { "type": "string" }, + "tagger.email": { "type": "string" }, + "tagger.name": { "type": "string" }, + "type": { + "enum": ["commit", "tree", "blob"], + "required": true, + "type": "string" + } + }, + "url": "/repos/:owner/:repo/git/tags" + }, + "createTree": { + "method": "POST", + "params": { + "base_tree": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "tree": { "required": true, "type": "object[]" }, + "tree[].content": { "type": "string" }, + "tree[].mode": { + "enum": ["100644", "100755", "040000", "160000", "120000"], + "type": "string" + }, + "tree[].path": { "type": "string" }, + "tree[].sha": { "allowNull": true, "type": "string" }, + "tree[].type": { "enum": ["blob", "tree", "commit"], "type": "string" } + }, + "url": "/repos/:owner/:repo/git/trees" + }, + "deleteRef": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/refs/:ref" + }, + "getBlob": { + "method": "GET", + "params": { + "file_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/blobs/:file_sha" + }, + "getCommit": { + "method": "GET", + "params": { + "commit_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/commits/:commit_sha" + }, + "getRef": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/ref/:ref" + }, + "getTag": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "tag_sha": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/tags/:tag_sha" + }, + "getTree": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "recursive": { "enum": ["1"], "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "tree_sha": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/trees/:tree_sha" + }, + "listMatchingRefs": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/matching-refs/:ref" + }, + "listRefs": { + "method": "GET", + "params": { + "namespace": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/refs/:namespace" + }, + "updateRef": { + "method": "PATCH", + "params": { + "force": { "type": "boolean" }, + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/refs/:ref" + } + }, + "gitignore": { + "getTemplate": { + "method": "GET", + "params": { "name": { "required": true, "type": "string" } }, + "url": "/gitignore/templates/:name" + }, + "listTemplates": { + "method": "GET", + "params": {}, + "url": "/gitignore/templates" + } + }, + "interactions": { + "addOrUpdateRestrictionsForOrg": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "PUT", + "params": { + "limit": { + "enum": ["existing_users", "contributors_only", "collaborators_only"], + "required": true, + "type": "string" + }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/interaction-limits" + }, + "addOrUpdateRestrictionsForRepo": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "PUT", + "params": { + "limit": { + "enum": ["existing_users", "contributors_only", "collaborators_only"], + "required": true, + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/interaction-limits" + }, + "getRestrictionsForOrg": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org/interaction-limits" + }, + "getRestrictionsForRepo": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/interaction-limits" + }, + "removeRestrictionsForOrg": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "DELETE", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org/interaction-limits" + }, + "removeRestrictionsForRepo": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/interaction-limits" + } + }, + "issues": { + "addAssignees": { + "method": "POST", + "params": { + "assignees": { "type": "string[]" }, + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/assignees" + }, + "addLabels": { + "method": "POST", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "labels": { "required": true, "type": "string[]" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/labels" + }, + "checkAssignee": { + "method": "GET", + "params": { + "assignee": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/assignees/:assignee" + }, + "create": { + "method": "POST", + "params": { + "assignee": { "type": "string" }, + "assignees": { "type": "string[]" }, + "body": { "type": "string" }, + "labels": { "type": "string[]" }, + "milestone": { "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "title": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues" + }, + "createComment": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/comments" + }, + "createLabel": { + "method": "POST", + "params": { + "color": { "required": true, "type": "string" }, + "description": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/labels" + }, + "createMilestone": { + "method": "POST", + "params": { + "description": { "type": "string" }, + "due_on": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "state": { "enum": ["open", "closed"], "type": "string" }, + "title": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones" + }, + "deleteComment": { + "method": "DELETE", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments/:comment_id" + }, + "deleteLabel": { + "method": "DELETE", + "params": { + "name": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/labels/:name" + }, + "deleteMilestone": { + "method": "DELETE", + "params": { + "milestone_number": { "required": true, "type": "integer" }, + "number": { + "alias": "milestone_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones/:milestone_number" + }, + "get": { + "method": "GET", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number" + }, + "getComment": { + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments/:comment_id" + }, + "getEvent": { + "method": "GET", + "params": { + "event_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/events/:event_id" + }, + "getLabel": { + "method": "GET", + "params": { + "name": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/labels/:name" + }, + "getMilestone": { + "method": "GET", + "params": { + "milestone_number": { "required": true, "type": "integer" }, + "number": { + "alias": "milestone_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones/:milestone_number" + }, + "list": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "filter": { + "enum": ["assigned", "created", "mentioned", "subscribed", "all"], + "type": "string" + }, + "labels": { "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" }, + "sort": { + "enum": ["created", "updated", "comments"], + "type": "string" + }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/issues" + }, + "listAssignees": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/assignees" + }, + "listComments": { + "method": "GET", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/comments" + }, + "listCommentsForRepo": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments" + }, + "listEvents": { + "method": "GET", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/events" + }, + "listEventsForRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/events" + }, + "listEventsForTimeline": { + "headers": { + "accept": "application/vnd.github.mockingbird-preview+json" + }, + "method": "GET", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/timeline" + }, + "listForAuthenticatedUser": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "filter": { + "enum": ["assigned", "created", "mentioned", "subscribed", "all"], + "type": "string" + }, + "labels": { "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" }, + "sort": { + "enum": ["created", "updated", "comments"], + "type": "string" + }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/user/issues" + }, + "listForOrg": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "filter": { + "enum": ["assigned", "created", "mentioned", "subscribed", "all"], + "type": "string" + }, + "labels": { "type": "string" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" }, + "sort": { + "enum": ["created", "updated", "comments"], + "type": "string" + }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/orgs/:org/issues" + }, + "listForRepo": { + "method": "GET", + "params": { + "assignee": { "type": "string" }, + "creator": { "type": "string" }, + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "labels": { "type": "string" }, + "mentioned": { "type": "string" }, + "milestone": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" }, + "sort": { + "enum": ["created", "updated", "comments"], + "type": "string" + }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/repos/:owner/:repo/issues" + }, + "listLabelsForMilestone": { + "method": "GET", + "params": { + "milestone_number": { "required": true, "type": "integer" }, + "number": { + "alias": "milestone_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones/:milestone_number/labels" + }, + "listLabelsForRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/labels" + }, + "listLabelsOnIssue": { + "method": "GET", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/labels" + }, + "listMilestonesForRepo": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sort": { "enum": ["due_on", "completeness"], "type": "string" }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones" + }, + "lock": { + "method": "PUT", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "lock_reason": { + "enum": ["off-topic", "too heated", "resolved", "spam"], + "type": "string" + }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/lock" + }, + "removeAssignees": { + "method": "DELETE", + "params": { + "assignees": { "type": "string[]" }, + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/assignees" + }, + "removeLabel": { + "method": "DELETE", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "name": { "required": true, "type": "string" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/labels/:name" + }, + "removeLabels": { + "method": "DELETE", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/labels" + }, + "replaceLabels": { + "method": "PUT", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "labels": { "type": "string[]" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/labels" + }, + "unlock": { + "method": "DELETE", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/lock" + }, + "update": { + "method": "PATCH", + "params": { + "assignee": { "type": "string" }, + "assignees": { "type": "string[]" }, + "body": { "type": "string" }, + "issue_number": { "required": true, "type": "integer" }, + "labels": { "type": "string[]" }, + "milestone": { "allowNull": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "state": { "enum": ["open", "closed"], "type": "string" }, + "title": { "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number" + }, + "updateComment": { + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments/:comment_id" + }, + "updateLabel": { + "method": "PATCH", + "params": { + "color": { "type": "string" }, + "current_name": { "required": true, "type": "string" }, + "description": { "type": "string" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/labels/:current_name" + }, + "updateMilestone": { + "method": "PATCH", + "params": { + "description": { "type": "string" }, + "due_on": { "type": "string" }, + "milestone_number": { "required": true, "type": "integer" }, + "number": { + "alias": "milestone_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "state": { "enum": ["open", "closed"], "type": "string" }, + "title": { "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones/:milestone_number" + } + }, + "licenses": { + "get": { + "method": "GET", + "params": { "license": { "required": true, "type": "string" } }, + "url": "/licenses/:license" + }, + "getForRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/license" + }, + "list": { + "deprecated": "octokit.licenses.list() has been renamed to octokit.licenses.listCommonlyUsed() (2019-03-05)", + "method": "GET", + "params": {}, + "url": "/licenses" + }, + "listCommonlyUsed": { "method": "GET", "params": {}, "url": "/licenses" } + }, + "markdown": { + "render": { + "method": "POST", + "params": { + "context": { "type": "string" }, + "mode": { "enum": ["markdown", "gfm"], "type": "string" }, + "text": { "required": true, "type": "string" } + }, + "url": "/markdown" + }, + "renderRaw": { + "headers": { "content-type": "text/plain; charset=utf-8" }, + "method": "POST", + "params": { + "data": { "mapTo": "data", "required": true, "type": "string" } + }, + "url": "/markdown/raw" + } + }, + "meta": { "get": { "method": "GET", "params": {}, "url": "/meta" } }, + "migrations": { + "cancelImport": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/import" + }, + "deleteArchiveForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "DELETE", + "params": { "migration_id": { "required": true, "type": "integer" } }, + "url": "/user/migrations/:migration_id/archive" + }, + "deleteArchiveForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "DELETE", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/migrations/:migration_id/archive" + }, + "getArchiveForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { "migration_id": { "required": true, "type": "integer" } }, + "url": "/user/migrations/:migration_id/archive" + }, + "getArchiveForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/migrations/:migration_id/archive" + }, + "getCommitAuthors": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" } + }, + "url": "/repos/:owner/:repo/import/authors" + }, + "getImportProgress": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/import" + }, + "getLargeFiles": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/import/large_files" + }, + "getStatusForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { "migration_id": { "required": true, "type": "integer" } }, + "url": "/user/migrations/:migration_id" + }, + "getStatusForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/migrations/:migration_id" + }, + "listForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/migrations" + }, + "listForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/migrations" + }, + "listReposForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/migrations/:migration_id/repositories" + }, + "listReposForUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/:migration_id/repositories" + }, + "mapCommitAuthor": { + "method": "PATCH", + "params": { + "author_id": { "required": true, "type": "integer" }, + "email": { "type": "string" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/import/authors/:author_id" + }, + "setLfsPreference": { + "method": "PATCH", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "use_lfs": { + "enum": ["opt_in", "opt_out"], + "required": true, + "type": "string" + } + }, + "url": "/repos/:owner/:repo/import/lfs" + }, + "startForAuthenticatedUser": { + "method": "POST", + "params": { + "exclude_attachments": { "type": "boolean" }, + "lock_repositories": { "type": "boolean" }, + "repositories": { "required": true, "type": "string[]" } + }, + "url": "/user/migrations" + }, + "startForOrg": { + "method": "POST", + "params": { + "exclude_attachments": { "type": "boolean" }, + "lock_repositories": { "type": "boolean" }, + "org": { "required": true, "type": "string" }, + "repositories": { "required": true, "type": "string[]" } + }, + "url": "/orgs/:org/migrations" + }, + "startImport": { + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "tfvc_project": { "type": "string" }, + "vcs": { + "enum": ["subversion", "git", "mercurial", "tfvc"], + "type": "string" + }, + "vcs_password": { "type": "string" }, + "vcs_url": { "required": true, "type": "string" }, + "vcs_username": { "type": "string" } + }, + "url": "/repos/:owner/:repo/import" + }, + "unlockRepoForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "DELETE", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "repo_name": { "required": true, "type": "string" } + }, + "url": "/user/migrations/:migration_id/repos/:repo_name/lock" + }, + "unlockRepoForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "DELETE", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "repo_name": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/migrations/:migration_id/repos/:repo_name/lock" + }, + "updateImport": { + "method": "PATCH", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "vcs_password": { "type": "string" }, + "vcs_username": { "type": "string" } + }, + "url": "/repos/:owner/:repo/import" + } + }, + "oauthAuthorizations": { + "checkAuthorization": { + "deprecated": "octokit.oauthAuthorizations.checkAuthorization() has been renamed to octokit.apps.checkAuthorization() (2019-11-05)", + "method": "GET", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "createAuthorization": { + "deprecated": "octokit.oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization", + "method": "POST", + "params": { + "client_id": { "type": "string" }, + "client_secret": { "type": "string" }, + "fingerprint": { "type": "string" }, + "note": { "required": true, "type": "string" }, + "note_url": { "type": "string" }, + "scopes": { "type": "string[]" } + }, + "url": "/authorizations" + }, + "deleteAuthorization": { + "deprecated": "octokit.oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization", + "method": "DELETE", + "params": { "authorization_id": { "required": true, "type": "integer" } }, + "url": "/authorizations/:authorization_id" + }, + "deleteGrant": { + "deprecated": "octokit.oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant", + "method": "DELETE", + "params": { "grant_id": { "required": true, "type": "integer" } }, + "url": "/applications/grants/:grant_id" + }, + "getAuthorization": { + "deprecated": "octokit.oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization", + "method": "GET", + "params": { "authorization_id": { "required": true, "type": "integer" } }, + "url": "/authorizations/:authorization_id" + }, + "getGrant": { + "deprecated": "octokit.oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant", + "method": "GET", + "params": { "grant_id": { "required": true, "type": "integer" } }, + "url": "/applications/grants/:grant_id" + }, + "getOrCreateAuthorizationForApp": { + "deprecated": "octokit.oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app", + "method": "PUT", + "params": { + "client_id": { "required": true, "type": "string" }, + "client_secret": { "required": true, "type": "string" }, + "fingerprint": { "type": "string" }, + "note": { "type": "string" }, + "note_url": { "type": "string" }, + "scopes": { "type": "string[]" } + }, + "url": "/authorizations/clients/:client_id" + }, + "getOrCreateAuthorizationForAppAndFingerprint": { + "deprecated": "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint", + "method": "PUT", + "params": { + "client_id": { "required": true, "type": "string" }, + "client_secret": { "required": true, "type": "string" }, + "fingerprint": { "required": true, "type": "string" }, + "note": { "type": "string" }, + "note_url": { "type": "string" }, + "scopes": { "type": "string[]" } + }, + "url": "/authorizations/clients/:client_id/:fingerprint" + }, + "getOrCreateAuthorizationForAppFingerprint": { + "deprecated": "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() has been renamed to octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() (2018-12-27)", + "method": "PUT", + "params": { + "client_id": { "required": true, "type": "string" }, + "client_secret": { "required": true, "type": "string" }, + "fingerprint": { "required": true, "type": "string" }, + "note": { "type": "string" }, + "note_url": { "type": "string" }, + "scopes": { "type": "string[]" } + }, + "url": "/authorizations/clients/:client_id/:fingerprint" + }, + "listAuthorizations": { + "deprecated": "octokit.oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/authorizations" + }, + "listGrants": { + "deprecated": "octokit.oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/applications/grants" + }, + "resetAuthorization": { + "deprecated": "octokit.oauthAuthorizations.resetAuthorization() has been renamed to octokit.apps.resetAuthorization() (2019-11-05)", + "method": "POST", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "revokeAuthorizationForApplication": { + "deprecated": "octokit.oauthAuthorizations.revokeAuthorizationForApplication() has been renamed to octokit.apps.revokeAuthorizationForApplication() (2019-11-05)", + "method": "DELETE", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "revokeGrantForApplication": { + "deprecated": "octokit.oauthAuthorizations.revokeGrantForApplication() has been renamed to octokit.apps.revokeGrantForApplication() (2019-11-05)", + "method": "DELETE", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/grants/:access_token" + }, + "updateAuthorization": { + "deprecated": "octokit.oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization", + "method": "PATCH", + "params": { + "add_scopes": { "type": "string[]" }, + "authorization_id": { "required": true, "type": "integer" }, + "fingerprint": { "type": "string" }, + "note": { "type": "string" }, + "note_url": { "type": "string" }, + "remove_scopes": { "type": "string[]" }, + "scopes": { "type": "string[]" } + }, + "url": "/authorizations/:authorization_id" + } + }, + "orgs": { + "addOrUpdateMembership": { + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "role": { "enum": ["admin", "member"], "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/memberships/:username" + }, + "blockUser": { + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/blocks/:username" + }, + "checkBlockedUser": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/blocks/:username" + }, + "checkMembership": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/members/:username" + }, + "checkPublicMembership": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/public_members/:username" + }, + "concealMembership": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/public_members/:username" + }, + "convertMemberToOutsideCollaborator": { + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/outside_collaborators/:username" + }, + "createHook": { + "method": "POST", + "params": { + "active": { "type": "boolean" }, + "config": { "required": true, "type": "object" }, + "config.content_type": { "type": "string" }, + "config.insecure_ssl": { "type": "string" }, + "config.secret": { "type": "string" }, + "config.url": { "required": true, "type": "string" }, + "events": { "type": "string[]" }, + "name": { "required": true, "type": "string" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/hooks" + }, + "createInvitation": { + "method": "POST", + "params": { + "email": { "type": "string" }, + "invitee_id": { "type": "integer" }, + "org": { "required": true, "type": "string" }, + "role": { + "enum": ["admin", "direct_member", "billing_manager"], + "type": "string" + }, + "team_ids": { "type": "integer[]" } + }, + "url": "/orgs/:org/invitations" + }, + "deleteHook": { + "method": "DELETE", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/hooks/:hook_id" + }, + "get": { + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org" + }, + "getHook": { + "method": "GET", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/hooks/:hook_id" + }, + "getMembership": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/memberships/:username" + }, + "getMembershipForAuthenticatedUser": { + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/user/memberships/orgs/:org" + }, + "list": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/organizations" + }, + "listBlockedUsers": { + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org/blocks" + }, + "listForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/orgs" + }, + "listForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/orgs" + }, + "listHooks": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/hooks" + }, + "listInstallations": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/installations" + }, + "listInvitationTeams": { + "method": "GET", + "params": { + "invitation_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/invitations/:invitation_id/teams" + }, + "listMembers": { + "method": "GET", + "params": { + "filter": { "enum": ["2fa_disabled", "all"], "type": "string" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "role": { "enum": ["all", "admin", "member"], "type": "string" } + }, + "url": "/orgs/:org/members" + }, + "listMemberships": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "state": { "enum": ["active", "pending"], "type": "string" } + }, + "url": "/user/memberships/orgs" + }, + "listOutsideCollaborators": { + "method": "GET", + "params": { + "filter": { "enum": ["2fa_disabled", "all"], "type": "string" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/outside_collaborators" + }, + "listPendingInvitations": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/invitations" + }, + "listPublicMembers": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/public_members" + }, + "pingHook": { + "method": "POST", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/hooks/:hook_id/pings" + }, + "publicizeMembership": { + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/public_members/:username" + }, + "removeMember": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/members/:username" + }, + "removeMembership": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/memberships/:username" + }, + "removeOutsideCollaborator": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/outside_collaborators/:username" + }, + "unblockUser": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/blocks/:username" + }, + "update": { + "method": "PATCH", + "params": { + "billing_email": { "type": "string" }, + "company": { "type": "string" }, + "default_repository_permission": { + "enum": ["read", "write", "admin", "none"], + "type": "string" + }, + "description": { "type": "string" }, + "email": { "type": "string" }, + "has_organization_projects": { "type": "boolean" }, + "has_repository_projects": { "type": "boolean" }, + "location": { "type": "string" }, + "members_allowed_repository_creation_type": { + "enum": ["all", "private", "none"], + "type": "string" + }, + "members_can_create_internal_repositories": { "type": "boolean" }, + "members_can_create_private_repositories": { "type": "boolean" }, + "members_can_create_public_repositories": { "type": "boolean" }, + "members_can_create_repositories": { "type": "boolean" }, + "name": { "type": "string" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org" + }, + "updateHook": { + "method": "PATCH", + "params": { + "active": { "type": "boolean" }, + "config": { "type": "object" }, + "config.content_type": { "type": "string" }, + "config.insecure_ssl": { "type": "string" }, + "config.secret": { "type": "string" }, + "config.url": { "required": true, "type": "string" }, + "events": { "type": "string[]" }, + "hook_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/hooks/:hook_id" + }, + "updateMembership": { + "method": "PATCH", + "params": { + "org": { "required": true, "type": "string" }, + "state": { "enum": ["active"], "required": true, "type": "string" } + }, + "url": "/user/memberships/orgs/:org" + } + }, + "projects": { + "addCollaborator": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PUT", + "params": { + "permission": { "enum": ["read", "write", "admin"], "type": "string" }, + "project_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/projects/:project_id/collaborators/:username" + }, + "createCard": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "column_id": { "required": true, "type": "integer" }, + "content_id": { "type": "integer" }, + "content_type": { "type": "string" }, + "note": { "type": "string" } + }, + "url": "/projects/columns/:column_id/cards" + }, + "createColumn": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "name": { "required": true, "type": "string" }, + "project_id": { "required": true, "type": "integer" } + }, + "url": "/projects/:project_id/columns" + }, + "createForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "body": { "type": "string" }, + "name": { "required": true, "type": "string" } + }, + "url": "/user/projects" + }, + "createForOrg": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "body": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/projects" + }, + "createForRepo": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "body": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/projects" + }, + "delete": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "DELETE", + "params": { "project_id": { "required": true, "type": "integer" } }, + "url": "/projects/:project_id" + }, + "deleteCard": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "DELETE", + "params": { "card_id": { "required": true, "type": "integer" } }, + "url": "/projects/columns/cards/:card_id" + }, + "deleteColumn": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "DELETE", + "params": { "column_id": { "required": true, "type": "integer" } }, + "url": "/projects/columns/:column_id" + }, + "get": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "project_id": { "required": true, "type": "integer" } + }, + "url": "/projects/:project_id" + }, + "getCard": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { "card_id": { "required": true, "type": "integer" } }, + "url": "/projects/columns/cards/:card_id" + }, + "getColumn": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { "column_id": { "required": true, "type": "integer" } }, + "url": "/projects/columns/:column_id" + }, + "listCards": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "archived_state": { + "enum": ["all", "archived", "not_archived"], + "type": "string" + }, + "column_id": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/projects/columns/:column_id/cards" + }, + "listCollaborators": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "affiliation": { + "enum": ["outside", "direct", "all"], + "type": "string" + }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "project_id": { "required": true, "type": "integer" } + }, + "url": "/projects/:project_id/collaborators" + }, + "listColumns": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "project_id": { "required": true, "type": "integer" } + }, + "url": "/projects/:project_id/columns" + }, + "listForOrg": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/orgs/:org/projects" + }, + "listForRepo": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/repos/:owner/:repo/projects" + }, + "listForUser": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "state": { "enum": ["open", "closed", "all"], "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/projects" + }, + "moveCard": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "card_id": { "required": true, "type": "integer" }, + "column_id": { "type": "integer" }, + "position": { + "required": true, + "type": "string", + "validation": "^(top|bottom|after:\\d+)$" + } + }, + "url": "/projects/columns/cards/:card_id/moves" + }, + "moveColumn": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "column_id": { "required": true, "type": "integer" }, + "position": { + "required": true, + "type": "string", + "validation": "^(first|last|after:\\d+)$" + } + }, + "url": "/projects/columns/:column_id/moves" + }, + "removeCollaborator": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "DELETE", + "params": { + "project_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/projects/:project_id/collaborators/:username" + }, + "reviewUserPermissionLevel": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "project_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/projects/:project_id/collaborators/:username/permission" + }, + "update": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PATCH", + "params": { + "body": { "type": "string" }, + "name": { "type": "string" }, + "organization_permission": { "type": "string" }, + "private": { "type": "boolean" }, + "project_id": { "required": true, "type": "integer" }, + "state": { "enum": ["open", "closed"], "type": "string" } + }, + "url": "/projects/:project_id" + }, + "updateCard": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PATCH", + "params": { + "archived": { "type": "boolean" }, + "card_id": { "required": true, "type": "integer" }, + "note": { "type": "string" } + }, + "url": "/projects/columns/cards/:card_id" + }, + "updateColumn": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PATCH", + "params": { + "column_id": { "required": true, "type": "integer" }, + "name": { "required": true, "type": "string" } + }, + "url": "/projects/columns/:column_id" + } + }, + "pulls": { + "checkIfMerged": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/merge" + }, + "create": { + "method": "POST", + "params": { + "base": { "required": true, "type": "string" }, + "body": { "type": "string" }, + "draft": { "type": "boolean" }, + "head": { "required": true, "type": "string" }, + "maintainer_can_modify": { "type": "boolean" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "title": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls" + }, + "createComment": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "commit_id": { "required": true, "type": "string" }, + "in_reply_to": { + "deprecated": true, + "description": "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", + "type": "integer" + }, + "line": { "type": "integer" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "position": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "side": { "enum": ["LEFT", "RIGHT"], "type": "string" }, + "start_line": { "type": "integer" }, + "start_side": { "enum": ["LEFT", "RIGHT", "side"], "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + "createCommentReply": { + "deprecated": "octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (2019-09-09)", + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "commit_id": { "required": true, "type": "string" }, + "in_reply_to": { + "deprecated": true, + "description": "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", + "type": "integer" + }, + "line": { "type": "integer" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "position": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "side": { "enum": ["LEFT", "RIGHT"], "type": "string" }, + "start_line": { "type": "integer" }, + "start_side": { "enum": ["LEFT", "RIGHT", "side"], "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + "createFromIssue": { + "deprecated": "octokit.pulls.createFromIssue() is deprecated, see https://developer.github.com/v3/pulls/#create-a-pull-request", + "method": "POST", + "params": { + "base": { "required": true, "type": "string" }, + "draft": { "type": "boolean" }, + "head": { "required": true, "type": "string" }, + "issue": { "required": true, "type": "integer" }, + "maintainer_can_modify": { "type": "boolean" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls" + }, + "createReview": { + "method": "POST", + "params": { + "body": { "type": "string" }, + "comments": { "type": "object[]" }, + "comments[].body": { "required": true, "type": "string" }, + "comments[].path": { "required": true, "type": "string" }, + "comments[].position": { "required": true, "type": "integer" }, + "commit_id": { "type": "string" }, + "event": { + "enum": ["APPROVE", "REQUEST_CHANGES", "COMMENT"], + "type": "string" + }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews" + }, + "createReviewCommentReply": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/comments/:comment_id/replies" + }, + "createReviewRequest": { + "method": "POST", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "reviewers": { "type": "string[]" }, + "team_reviewers": { "type": "string[]" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + "deleteComment": { + "method": "DELETE", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + "deletePendingReview": { + "method": "DELETE", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + }, + "deleteReviewRequest": { + "method": "DELETE", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "reviewers": { "type": "string[]" }, + "team_reviewers": { "type": "string[]" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + "dismissReview": { + "method": "PUT", + "params": { + "message": { "required": true, "type": "string" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals" + }, + "get": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number" + }, + "getComment": { + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + "getCommentsForReview": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments" + }, + "getReview": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + }, + "list": { + "method": "GET", + "params": { + "base": { "type": "string" }, + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "head": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sort": { + "enum": ["created", "updated", "popularity", "long-running"], + "type": "string" + }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls" + }, + "listComments": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + "listCommentsForRepo": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments" + }, + "listCommits": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/commits" + }, + "listFiles": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/files" + }, + "listReviewRequests": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + "listReviews": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews" + }, + "merge": { + "method": "PUT", + "params": { + "commit_message": { "type": "string" }, + "commit_title": { "type": "string" }, + "merge_method": { + "enum": ["merge", "squash", "rebase"], + "type": "string" + }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/merge" + }, + "submitReview": { + "method": "POST", + "params": { + "body": { "type": "string" }, + "event": { + "enum": ["APPROVE", "REQUEST_CHANGES", "COMMENT"], + "required": true, + "type": "string" + }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events" + }, + "update": { + "method": "PATCH", + "params": { + "base": { "type": "string" }, + "body": { "type": "string" }, + "maintainer_can_modify": { "type": "boolean" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "state": { "enum": ["open", "closed"], "type": "string" }, + "title": { "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number" + }, + "updateBranch": { + "headers": { "accept": "application/vnd.github.lydian-preview+json" }, + "method": "PUT", + "params": { + "expected_head_sha": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/update-branch" + }, + "updateComment": { + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + "updateReview": { + "method": "PUT", + "params": { + "body": { "required": true, "type": "string" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + } + }, + "rateLimit": { + "get": { "method": "GET", "params": {}, "url": "/rate_limit" } + }, + "reactions": { + "createForCommitComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments/:comment_id/reactions" + }, + "createForIssue": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/reactions" + }, + "createForIssueComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments/:comment_id/reactions" + }, + "createForPullRequestReviewComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments/:comment_id/reactions" + }, + "createForTeamDiscussion": { + "deprecated": "octokit.reactions.createForTeamDiscussion() has been renamed to octokit.reactions.createForTeamDiscussionLegacy() (2020-01-16)", + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/reactions" + }, + "createForTeamDiscussionComment": { + "deprecated": "octokit.reactions.createForTeamDiscussionComment() has been renamed to octokit.reactions.createForTeamDiscussionCommentLegacy() (2020-01-16)", + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + "createForTeamDiscussionCommentInOrg": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions" + }, + "createForTeamDiscussionCommentLegacy": { + "deprecated": "octokit.reactions.createForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy", + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + "createForTeamDiscussionInOrg": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions" + }, + "createForTeamDiscussionLegacy": { + "deprecated": "octokit.reactions.createForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy", + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/reactions" + }, + "delete": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "DELETE", + "params": { "reaction_id": { "required": true, "type": "integer" } }, + "url": "/reactions/:reaction_id" + }, + "listForCommitComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments/:comment_id/reactions" + }, + "listForIssue": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/reactions" + }, + "listForIssueComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments/:comment_id/reactions" + }, + "listForPullRequestReviewComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments/:comment_id/reactions" + }, + "listForTeamDiscussion": { + "deprecated": "octokit.reactions.listForTeamDiscussion() has been renamed to octokit.reactions.listForTeamDiscussionLegacy() (2020-01-16)", + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/reactions" + }, + "listForTeamDiscussionComment": { + "deprecated": "octokit.reactions.listForTeamDiscussionComment() has been renamed to octokit.reactions.listForTeamDiscussionCommentLegacy() (2020-01-16)", + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + "listForTeamDiscussionCommentInOrg": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions" + }, + "listForTeamDiscussionCommentLegacy": { + "deprecated": "octokit.reactions.listForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy", + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + "listForTeamDiscussionInOrg": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions" + }, + "listForTeamDiscussionLegacy": { + "deprecated": "octokit.reactions.listForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy", + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/reactions" + } + }, + "repos": { + "acceptInvitation": { + "method": "PATCH", + "params": { "invitation_id": { "required": true, "type": "integer" } }, + "url": "/user/repository_invitations/:invitation_id" + }, + "addCollaborator": { + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "repo": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/collaborators/:username" + }, + "addDeployKey": { + "method": "POST", + "params": { + "key": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "read_only": { "type": "boolean" }, + "repo": { "required": true, "type": "string" }, + "title": { "type": "string" } + }, + "url": "/repos/:owner/:repo/keys" + }, + "addProtectedBranchAdminEnforcement": { + "method": "POST", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + "addProtectedBranchAppRestrictions": { + "method": "POST", + "params": { + "apps": { "mapTo": "data", "required": true, "type": "string[]" }, + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + "addProtectedBranchRequiredSignatures": { + "headers": { "accept": "application/vnd.github.zzzax-preview+json" }, + "method": "POST", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + "addProtectedBranchRequiredStatusChecksContexts": { + "method": "POST", + "params": { + "branch": { "required": true, "type": "string" }, + "contexts": { "mapTo": "data", "required": true, "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + "addProtectedBranchTeamRestrictions": { + "method": "POST", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "teams": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "addProtectedBranchUserRestrictions": { + "method": "POST", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "users": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "checkCollaborator": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/collaborators/:username" + }, + "checkVulnerabilityAlerts": { + "headers": { "accept": "application/vnd.github.dorian-preview+json" }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/vulnerability-alerts" + }, + "compareCommits": { + "method": "GET", + "params": { + "base": { "required": true, "type": "string" }, + "head": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/compare/:base...:head" + }, + "createCommitComment": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "commit_sha": { "required": true, "type": "string" }, + "line": { "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "path": { "type": "string" }, + "position": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sha": { "alias": "commit_sha", "deprecated": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:commit_sha/comments" + }, + "createDeployment": { + "method": "POST", + "params": { + "auto_merge": { "type": "boolean" }, + "description": { "type": "string" }, + "environment": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "payload": { "type": "string" }, + "production_environment": { "type": "boolean" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "required_contexts": { "type": "string[]" }, + "task": { "type": "string" }, + "transient_environment": { "type": "boolean" } + }, + "url": "/repos/:owner/:repo/deployments" + }, + "createDeploymentStatus": { + "method": "POST", + "params": { + "auto_inactive": { "type": "boolean" }, + "deployment_id": { "required": true, "type": "integer" }, + "description": { "type": "string" }, + "environment": { + "enum": ["production", "staging", "qa"], + "type": "string" + }, + "environment_url": { "type": "string" }, + "log_url": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "state": { + "enum": [ + "error", + "failure", + "inactive", + "in_progress", + "queued", + "pending", + "success" + ], + "required": true, + "type": "string" + }, + "target_url": { "type": "string" } + }, + "url": "/repos/:owner/:repo/deployments/:deployment_id/statuses" + }, + "createDispatchEvent": { + "method": "POST", + "params": { + "client_payload": { "type": "object" }, + "event_type": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/dispatches" + }, + "createFile": { + "deprecated": "octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", + "method": "PUT", + "params": { + "author": { "type": "object" }, + "author.email": { "required": true, "type": "string" }, + "author.name": { "required": true, "type": "string" }, + "branch": { "type": "string" }, + "committer": { "type": "object" }, + "committer.email": { "required": true, "type": "string" }, + "committer.name": { "required": true, "type": "string" }, + "content": { "required": true, "type": "string" }, + "message": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" } + }, + "url": "/repos/:owner/:repo/contents/:path" + }, + "createForAuthenticatedUser": { + "method": "POST", + "params": { + "allow_merge_commit": { "type": "boolean" }, + "allow_rebase_merge": { "type": "boolean" }, + "allow_squash_merge": { "type": "boolean" }, + "auto_init": { "type": "boolean" }, + "delete_branch_on_merge": { "type": "boolean" }, + "description": { "type": "string" }, + "gitignore_template": { "type": "string" }, + "has_issues": { "type": "boolean" }, + "has_projects": { "type": "boolean" }, + "has_wiki": { "type": "boolean" }, + "homepage": { "type": "string" }, + "is_template": { "type": "boolean" }, + "license_template": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "private": { "type": "boolean" }, + "team_id": { "type": "integer" }, + "visibility": { + "enum": ["public", "private", "visibility", "internal"], + "type": "string" + } + }, + "url": "/user/repos" + }, + "createFork": { + "method": "POST", + "params": { + "organization": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/forks" + }, + "createHook": { + "method": "POST", + "params": { + "active": { "type": "boolean" }, + "config": { "required": true, "type": "object" }, + "config.content_type": { "type": "string" }, + "config.insecure_ssl": { "type": "string" }, + "config.secret": { "type": "string" }, + "config.url": { "required": true, "type": "string" }, + "events": { "type": "string[]" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks" + }, + "createInOrg": { + "method": "POST", + "params": { + "allow_merge_commit": { "type": "boolean" }, + "allow_rebase_merge": { "type": "boolean" }, + "allow_squash_merge": { "type": "boolean" }, + "auto_init": { "type": "boolean" }, + "delete_branch_on_merge": { "type": "boolean" }, + "description": { "type": "string" }, + "gitignore_template": { "type": "string" }, + "has_issues": { "type": "boolean" }, + "has_projects": { "type": "boolean" }, + "has_wiki": { "type": "boolean" }, + "homepage": { "type": "string" }, + "is_template": { "type": "boolean" }, + "license_template": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "org": { "required": true, "type": "string" }, + "private": { "type": "boolean" }, + "team_id": { "type": "integer" }, + "visibility": { + "enum": ["public", "private", "visibility", "internal"], + "type": "string" + } + }, + "url": "/orgs/:org/repos" + }, + "createOrUpdateFile": { + "method": "PUT", + "params": { + "author": { "type": "object" }, + "author.email": { "required": true, "type": "string" }, + "author.name": { "required": true, "type": "string" }, + "branch": { "type": "string" }, + "committer": { "type": "object" }, + "committer.email": { "required": true, "type": "string" }, + "committer.name": { "required": true, "type": "string" }, + "content": { "required": true, "type": "string" }, + "message": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" } + }, + "url": "/repos/:owner/:repo/contents/:path" + }, + "createRelease": { + "method": "POST", + "params": { + "body": { "type": "string" }, + "draft": { "type": "boolean" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "prerelease": { "type": "boolean" }, + "repo": { "required": true, "type": "string" }, + "tag_name": { "required": true, "type": "string" }, + "target_commitish": { "type": "string" } + }, + "url": "/repos/:owner/:repo/releases" + }, + "createStatus": { + "method": "POST", + "params": { + "context": { "type": "string" }, + "description": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "required": true, "type": "string" }, + "state": { + "enum": ["error", "failure", "pending", "success"], + "required": true, + "type": "string" + }, + "target_url": { "type": "string" } + }, + "url": "/repos/:owner/:repo/statuses/:sha" + }, + "createUsingTemplate": { + "headers": { "accept": "application/vnd.github.baptiste-preview+json" }, + "method": "POST", + "params": { + "description": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "owner": { "type": "string" }, + "private": { "type": "boolean" }, + "template_owner": { "required": true, "type": "string" }, + "template_repo": { "required": true, "type": "string" } + }, + "url": "/repos/:template_owner/:template_repo/generate" + }, + "declineInvitation": { + "method": "DELETE", + "params": { "invitation_id": { "required": true, "type": "integer" } }, + "url": "/user/repository_invitations/:invitation_id" + }, + "delete": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo" + }, + "deleteCommitComment": { + "method": "DELETE", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments/:comment_id" + }, + "deleteDownload": { + "method": "DELETE", + "params": { + "download_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/downloads/:download_id" + }, + "deleteFile": { + "method": "DELETE", + "params": { + "author": { "type": "object" }, + "author.email": { "type": "string" }, + "author.name": { "type": "string" }, + "branch": { "type": "string" }, + "committer": { "type": "object" }, + "committer.email": { "type": "string" }, + "committer.name": { "type": "string" }, + "message": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/contents/:path" + }, + "deleteHook": { + "method": "DELETE", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks/:hook_id" + }, + "deleteInvitation": { + "method": "DELETE", + "params": { + "invitation_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/invitations/:invitation_id" + }, + "deleteRelease": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "release_id": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/:release_id" + }, + "deleteReleaseAsset": { + "method": "DELETE", + "params": { + "asset_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/assets/:asset_id" + }, + "disableAutomatedSecurityFixes": { + "headers": { "accept": "application/vnd.github.london-preview+json" }, + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/automated-security-fixes" + }, + "disablePagesSite": { + "headers": { "accept": "application/vnd.github.switcheroo-preview+json" }, + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages" + }, + "disableVulnerabilityAlerts": { + "headers": { "accept": "application/vnd.github.dorian-preview+json" }, + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/vulnerability-alerts" + }, + "enableAutomatedSecurityFixes": { + "headers": { "accept": "application/vnd.github.london-preview+json" }, + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/automated-security-fixes" + }, + "enablePagesSite": { + "headers": { "accept": "application/vnd.github.switcheroo-preview+json" }, + "method": "POST", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "source": { "type": "object" }, + "source.branch": { "enum": ["master", "gh-pages"], "type": "string" }, + "source.path": { "type": "string" } + }, + "url": "/repos/:owner/:repo/pages" + }, + "enableVulnerabilityAlerts": { + "headers": { "accept": "application/vnd.github.dorian-preview+json" }, + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/vulnerability-alerts" + }, + "get": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo" + }, + "getAppsWithAccessToProtectedBranch": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + "getArchiveLink": { + "method": "GET", + "params": { + "archive_format": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/:archive_format/:ref" + }, + "getBranch": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch" + }, + "getBranchProtection": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection" + }, + "getClones": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "per": { "enum": ["day", "week"], "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/traffic/clones" + }, + "getCodeFrequencyStats": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stats/code_frequency" + }, + "getCollaboratorPermissionLevel": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/collaborators/:username/permission" + }, + "getCombinedStatusForRef": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:ref/status" + }, + "getCommit": { + "method": "GET", + "params": { + "commit_sha": { "alias": "ref", "deprecated": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "alias": "ref", "deprecated": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:ref" + }, + "getCommitActivityStats": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stats/commit_activity" + }, + "getCommitComment": { + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments/:comment_id" + }, + "getCommitRefSha": { + "deprecated": "octokit.repos.getCommitRefSha() is deprecated, see https://developer.github.com/v3/repos/commits/#get-a-single-commit", + "headers": { "accept": "application/vnd.github.v3.sha" }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:ref" + }, + "getContents": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "ref": { "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/contents/:path" + }, + "getContributorsStats": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stats/contributors" + }, + "getDeployKey": { + "method": "GET", + "params": { + "key_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/keys/:key_id" + }, + "getDeployment": { + "method": "GET", + "params": { + "deployment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/deployments/:deployment_id" + }, + "getDeploymentStatus": { + "method": "GET", + "params": { + "deployment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "status_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id" + }, + "getDownload": { + "method": "GET", + "params": { + "download_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/downloads/:download_id" + }, + "getHook": { + "method": "GET", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks/:hook_id" + }, + "getLatestPagesBuild": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages/builds/latest" + }, + "getLatestRelease": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/latest" + }, + "getPages": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages" + }, + "getPagesBuild": { + "method": "GET", + "params": { + "build_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages/builds/:build_id" + }, + "getParticipationStats": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stats/participation" + }, + "getProtectedBranchAdminEnforcement": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + "getProtectedBranchPullRequestReviewEnforcement": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + "getProtectedBranchRequiredSignatures": { + "headers": { "accept": "application/vnd.github.zzzax-preview+json" }, + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + "getProtectedBranchRequiredStatusChecks": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + "getProtectedBranchRestrictions": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions" + }, + "getPunchCardStats": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stats/punch_card" + }, + "getReadme": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/readme" + }, + "getRelease": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "release_id": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/:release_id" + }, + "getReleaseAsset": { + "method": "GET", + "params": { + "asset_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/assets/:asset_id" + }, + "getReleaseByTag": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "tag": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/tags/:tag" + }, + "getTeamsWithAccessToProtectedBranch": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "getTopPaths": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/traffic/popular/paths" + }, + "getTopReferrers": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/traffic/popular/referrers" + }, + "getUsersWithAccessToProtectedBranch": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "getViews": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "per": { "enum": ["day", "week"], "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/traffic/views" + }, + "list": { + "method": "GET", + "params": { + "affiliation": { "type": "string" }, + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "sort": { + "enum": ["created", "updated", "pushed", "full_name"], + "type": "string" + }, + "type": { + "enum": ["all", "owner", "public", "private", "member"], + "type": "string" + }, + "visibility": { "enum": ["all", "public", "private"], "type": "string" } + }, + "url": "/user/repos" + }, + "listAppsWithAccessToProtectedBranch": { + "deprecated": "octokit.repos.listAppsWithAccessToProtectedBranch() has been renamed to octokit.repos.getAppsWithAccessToProtectedBranch() (2019-09-13)", + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + "listAssetsForRelease": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "release_id": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/:release_id/assets" + }, + "listBranches": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "protected": { "type": "boolean" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches" + }, + "listBranchesForHeadCommit": { + "headers": { "accept": "application/vnd.github.groot-preview+json" }, + "method": "GET", + "params": { + "commit_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:commit_sha/branches-where-head" + }, + "listCollaborators": { + "method": "GET", + "params": { + "affiliation": { + "enum": ["outside", "direct", "all"], + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/collaborators" + }, + "listCommentsForCommit": { + "method": "GET", + "params": { + "commit_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "alias": "commit_sha", "deprecated": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:commit_sha/comments" + }, + "listCommitComments": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments" + }, + "listCommits": { + "method": "GET", + "params": { + "author": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "path": { "type": "string" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" }, + "since": { "type": "string" }, + "until": { "type": "string" } + }, + "url": "/repos/:owner/:repo/commits" + }, + "listContributors": { + "method": "GET", + "params": { + "anon": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/contributors" + }, + "listDeployKeys": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/keys" + }, + "listDeploymentStatuses": { + "method": "GET", + "params": { + "deployment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/deployments/:deployment_id/statuses" + }, + "listDeployments": { + "method": "GET", + "params": { + "environment": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" }, + "task": { "type": "string" } + }, + "url": "/repos/:owner/:repo/deployments" + }, + "listDownloads": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/downloads" + }, + "listForOrg": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "sort": { + "enum": ["created", "updated", "pushed", "full_name"], + "type": "string" + }, + "type": { + "enum": [ + "all", + "public", + "private", + "forks", + "sources", + "member", + "internal" + ], + "type": "string" + } + }, + "url": "/orgs/:org/repos" + }, + "listForUser": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "sort": { + "enum": ["created", "updated", "pushed", "full_name"], + "type": "string" + }, + "type": { "enum": ["all", "owner", "member"], "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/repos" + }, + "listForks": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sort": { "enum": ["newest", "oldest", "stargazers"], "type": "string" } + }, + "url": "/repos/:owner/:repo/forks" + }, + "listHooks": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks" + }, + "listInvitations": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/invitations" + }, + "listInvitationsForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/repository_invitations" + }, + "listLanguages": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/languages" + }, + "listPagesBuilds": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages/builds" + }, + "listProtectedBranchRequiredStatusChecksContexts": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + "listProtectedBranchTeamRestrictions": { + "deprecated": "octokit.repos.listProtectedBranchTeamRestrictions() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-09)", + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "listProtectedBranchUserRestrictions": { + "deprecated": "octokit.repos.listProtectedBranchUserRestrictions() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-09)", + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "listPublic": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/repositories" + }, + "listPullRequestsAssociatedWithCommit": { + "headers": { "accept": "application/vnd.github.groot-preview+json" }, + "method": "GET", + "params": { + "commit_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:commit_sha/pulls" + }, + "listReleases": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases" + }, + "listStatusesForRef": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:ref/statuses" + }, + "listTags": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/tags" + }, + "listTeams": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/teams" + }, + "listTeamsWithAccessToProtectedBranch": { + "deprecated": "octokit.repos.listTeamsWithAccessToProtectedBranch() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-13)", + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "listTopics": { + "headers": { "accept": "application/vnd.github.mercy-preview+json" }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/topics" + }, + "listUsersWithAccessToProtectedBranch": { + "deprecated": "octokit.repos.listUsersWithAccessToProtectedBranch() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-13)", + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "merge": { + "method": "POST", + "params": { + "base": { "required": true, "type": "string" }, + "commit_message": { "type": "string" }, + "head": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/merges" + }, + "pingHook": { + "method": "POST", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks/:hook_id/pings" + }, + "removeBranchProtection": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection" + }, + "removeCollaborator": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/collaborators/:username" + }, + "removeDeployKey": { + "method": "DELETE", + "params": { + "key_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/keys/:key_id" + }, + "removeProtectedBranchAdminEnforcement": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + "removeProtectedBranchAppRestrictions": { + "method": "DELETE", + "params": { + "apps": { "mapTo": "data", "required": true, "type": "string[]" }, + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + "removeProtectedBranchPullRequestReviewEnforcement": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + "removeProtectedBranchRequiredSignatures": { + "headers": { "accept": "application/vnd.github.zzzax-preview+json" }, + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + "removeProtectedBranchRequiredStatusChecks": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + "removeProtectedBranchRequiredStatusChecksContexts": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "contexts": { "mapTo": "data", "required": true, "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + "removeProtectedBranchRestrictions": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions" + }, + "removeProtectedBranchTeamRestrictions": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "teams": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "removeProtectedBranchUserRestrictions": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "users": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "replaceProtectedBranchAppRestrictions": { + "method": "PUT", + "params": { + "apps": { "mapTo": "data", "required": true, "type": "string[]" }, + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + "replaceProtectedBranchRequiredStatusChecksContexts": { + "method": "PUT", + "params": { + "branch": { "required": true, "type": "string" }, + "contexts": { "mapTo": "data", "required": true, "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + "replaceProtectedBranchTeamRestrictions": { + "method": "PUT", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "teams": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "replaceProtectedBranchUserRestrictions": { + "method": "PUT", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "users": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "replaceTopics": { + "headers": { "accept": "application/vnd.github.mercy-preview+json" }, + "method": "PUT", + "params": { + "names": { "required": true, "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/topics" + }, + "requestPageBuild": { + "method": "POST", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages/builds" + }, + "retrieveCommunityProfileMetrics": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/community/profile" + }, + "testPushHook": { + "method": "POST", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks/:hook_id/tests" + }, + "transfer": { + "method": "POST", + "params": { + "new_owner": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_ids": { "type": "integer[]" } + }, + "url": "/repos/:owner/:repo/transfer" + }, + "update": { + "method": "PATCH", + "params": { + "allow_merge_commit": { "type": "boolean" }, + "allow_rebase_merge": { "type": "boolean" }, + "allow_squash_merge": { "type": "boolean" }, + "archived": { "type": "boolean" }, + "default_branch": { "type": "string" }, + "delete_branch_on_merge": { "type": "boolean" }, + "description": { "type": "string" }, + "has_issues": { "type": "boolean" }, + "has_projects": { "type": "boolean" }, + "has_wiki": { "type": "boolean" }, + "homepage": { "type": "string" }, + "is_template": { "type": "boolean" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "private": { "type": "boolean" }, + "repo": { "required": true, "type": "string" }, + "visibility": { + "enum": ["public", "private", "visibility", "internal"], + "type": "string" + } + }, + "url": "/repos/:owner/:repo" + }, + "updateBranchProtection": { + "method": "PUT", + "params": { + "allow_deletions": { "type": "boolean" }, + "allow_force_pushes": { "allowNull": true, "type": "boolean" }, + "branch": { "required": true, "type": "string" }, + "enforce_admins": { + "allowNull": true, + "required": true, + "type": "boolean" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "required_linear_history": { "type": "boolean" }, + "required_pull_request_reviews": { + "allowNull": true, + "required": true, + "type": "object" + }, + "required_pull_request_reviews.dismiss_stale_reviews": { + "type": "boolean" + }, + "required_pull_request_reviews.dismissal_restrictions": { + "type": "object" + }, + "required_pull_request_reviews.dismissal_restrictions.teams": { + "type": "string[]" + }, + "required_pull_request_reviews.dismissal_restrictions.users": { + "type": "string[]" + }, + "required_pull_request_reviews.require_code_owner_reviews": { + "type": "boolean" + }, + "required_pull_request_reviews.required_approving_review_count": { + "type": "integer" + }, + "required_status_checks": { + "allowNull": true, + "required": true, + "type": "object" + }, + "required_status_checks.contexts": { + "required": true, + "type": "string[]" + }, + "required_status_checks.strict": { + "required": true, + "type": "boolean" + }, + "restrictions": { + "allowNull": true, + "required": true, + "type": "object" + }, + "restrictions.apps": { "type": "string[]" }, + "restrictions.teams": { "required": true, "type": "string[]" }, + "restrictions.users": { "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection" + }, + "updateCommitComment": { + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments/:comment_id" + }, + "updateFile": { + "deprecated": "octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", + "method": "PUT", + "params": { + "author": { "type": "object" }, + "author.email": { "required": true, "type": "string" }, + "author.name": { "required": true, "type": "string" }, + "branch": { "type": "string" }, + "committer": { "type": "object" }, + "committer.email": { "required": true, "type": "string" }, + "committer.name": { "required": true, "type": "string" }, + "content": { "required": true, "type": "string" }, + "message": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" } + }, + "url": "/repos/:owner/:repo/contents/:path" + }, + "updateHook": { + "method": "PATCH", + "params": { + "active": { "type": "boolean" }, + "add_events": { "type": "string[]" }, + "config": { "type": "object" }, + "config.content_type": { "type": "string" }, + "config.insecure_ssl": { "type": "string" }, + "config.secret": { "type": "string" }, + "config.url": { "required": true, "type": "string" }, + "events": { "type": "string[]" }, + "hook_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "remove_events": { "type": "string[]" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks/:hook_id" + }, + "updateInformationAboutPagesSite": { + "method": "PUT", + "params": { + "cname": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "source": { + "enum": ["\"gh-pages\"", "\"master\"", "\"master /docs\""], + "type": "string" + } + }, + "url": "/repos/:owner/:repo/pages" + }, + "updateInvitation": { + "method": "PATCH", + "params": { + "invitation_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "permissions": { "enum": ["read", "write", "admin"], "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/invitations/:invitation_id" + }, + "updateProtectedBranchPullRequestReviewEnforcement": { + "method": "PATCH", + "params": { + "branch": { "required": true, "type": "string" }, + "dismiss_stale_reviews": { "type": "boolean" }, + "dismissal_restrictions": { "type": "object" }, + "dismissal_restrictions.teams": { "type": "string[]" }, + "dismissal_restrictions.users": { "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "require_code_owner_reviews": { "type": "boolean" }, + "required_approving_review_count": { "type": "integer" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + "updateProtectedBranchRequiredStatusChecks": { + "method": "PATCH", + "params": { + "branch": { "required": true, "type": "string" }, + "contexts": { "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "strict": { "type": "boolean" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + "updateRelease": { + "method": "PATCH", + "params": { + "body": { "type": "string" }, + "draft": { "type": "boolean" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "prerelease": { "type": "boolean" }, + "release_id": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "tag_name": { "type": "string" }, + "target_commitish": { "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/:release_id" + }, + "updateReleaseAsset": { + "method": "PATCH", + "params": { + "asset_id": { "required": true, "type": "integer" }, + "label": { "type": "string" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/assets/:asset_id" + }, + "uploadReleaseAsset": { + "method": "POST", + "params": { + "file": { + "mapTo": "data", + "required": true, + "type": "string | object" + }, + "headers": { "required": true, "type": "object" }, + "headers.content-length": { "required": true, "type": "integer" }, + "headers.content-type": { "required": true, "type": "string" }, + "label": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "url": { "required": true, "type": "string" } + }, + "url": ":url" + } + }, + "search": { + "code": { + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { "enum": ["indexed"], "type": "string" } + }, + "url": "/search/code" + }, + "commits": { + "headers": { "accept": "application/vnd.github.cloak-preview+json" }, + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { "enum": ["author-date", "committer-date"], "type": "string" } + }, + "url": "/search/commits" + }, + "issues": { + "deprecated": "octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27)", + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { + "enum": [ + "comments", + "reactions", + "reactions-+1", + "reactions--1", + "reactions-smile", + "reactions-thinking_face", + "reactions-heart", + "reactions-tada", + "interactions", + "created", + "updated" + ], + "type": "string" + } + }, + "url": "/search/issues" + }, + "issuesAndPullRequests": { + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { + "enum": [ + "comments", + "reactions", + "reactions-+1", + "reactions--1", + "reactions-smile", + "reactions-thinking_face", + "reactions-heart", + "reactions-tada", + "interactions", + "created", + "updated" + ], + "type": "string" + } + }, + "url": "/search/issues" + }, + "labels": { + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "q": { "required": true, "type": "string" }, + "repository_id": { "required": true, "type": "integer" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/search/labels" + }, + "repos": { + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { + "enum": ["stars", "forks", "help-wanted-issues", "updated"], + "type": "string" + } + }, + "url": "/search/repositories" + }, + "topics": { + "method": "GET", + "params": { "q": { "required": true, "type": "string" } }, + "url": "/search/topics" + }, + "users": { + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { + "enum": ["followers", "repositories", "joined"], + "type": "string" + } + }, + "url": "/search/users" + } + }, + "teams": { + "addMember": { + "deprecated": "octokit.teams.addMember() has been renamed to octokit.teams.addMemberLegacy() (2020-01-16)", + "method": "PUT", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/members/:username" + }, + "addMemberLegacy": { + "deprecated": "octokit.teams.addMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member-legacy", + "method": "PUT", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/members/:username" + }, + "addOrUpdateMembership": { + "deprecated": "octokit.teams.addOrUpdateMembership() has been renamed to octokit.teams.addOrUpdateMembershipLegacy() (2020-01-16)", + "method": "PUT", + "params": { + "role": { "enum": ["member", "maintainer"], "type": "string" }, + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/memberships/:username" + }, + "addOrUpdateMembershipInOrg": { + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "role": { "enum": ["member", "maintainer"], "type": "string" }, + "team_slug": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/memberships/:username" + }, + "addOrUpdateMembershipLegacy": { + "deprecated": "octokit.teams.addOrUpdateMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy", + "method": "PUT", + "params": { + "role": { "enum": ["member", "maintainer"], "type": "string" }, + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/memberships/:username" + }, + "addOrUpdateProject": { + "deprecated": "octokit.teams.addOrUpdateProject() has been renamed to octokit.teams.addOrUpdateProjectLegacy() (2020-01-16)", + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PUT", + "params": { + "permission": { "enum": ["read", "write", "admin"], "type": "string" }, + "project_id": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects/:project_id" + }, + "addOrUpdateProjectInOrg": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "permission": { "enum": ["read", "write", "admin"], "type": "string" }, + "project_id": { "required": true, "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/projects/:project_id" + }, + "addOrUpdateProjectLegacy": { + "deprecated": "octokit.teams.addOrUpdateProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-project-legacy", + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PUT", + "params": { + "permission": { "enum": ["read", "write", "admin"], "type": "string" }, + "project_id": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects/:project_id" + }, + "addOrUpdateRepo": { + "deprecated": "octokit.teams.addOrUpdateRepo() has been renamed to octokit.teams.addOrUpdateRepoLegacy() (2020-01-16)", + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos/:owner/:repo" + }, + "addOrUpdateRepoInOrg": { + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/repos/:owner/:repo" + }, + "addOrUpdateRepoLegacy": { + "deprecated": "octokit.teams.addOrUpdateRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy", + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos/:owner/:repo" + }, + "checkManagesRepo": { + "deprecated": "octokit.teams.checkManagesRepo() has been renamed to octokit.teams.checkManagesRepoLegacy() (2020-01-16)", + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos/:owner/:repo" + }, + "checkManagesRepoInOrg": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/repos/:owner/:repo" + }, + "checkManagesRepoLegacy": { + "deprecated": "octokit.teams.checkManagesRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy", + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos/:owner/:repo" + }, + "create": { + "method": "POST", + "params": { + "description": { "type": "string" }, + "maintainers": { "type": "string[]" }, + "name": { "required": true, "type": "string" }, + "org": { "required": true, "type": "string" }, + "parent_team_id": { "type": "integer" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "privacy": { "enum": ["secret", "closed"], "type": "string" }, + "repo_names": { "type": "string[]" } + }, + "url": "/orgs/:org/teams" + }, + "createDiscussion": { + "deprecated": "octokit.teams.createDiscussion() has been renamed to octokit.teams.createDiscussionLegacy() (2020-01-16)", + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "private": { "type": "boolean" }, + "team_id": { "required": true, "type": "integer" }, + "title": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/discussions" + }, + "createDiscussionComment": { + "deprecated": "octokit.teams.createDiscussionComment() has been renamed to octokit.teams.createDiscussionCommentLegacy() (2020-01-16)", + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments" + }, + "createDiscussionCommentInOrg": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments" + }, + "createDiscussionCommentLegacy": { + "deprecated": "octokit.teams.createDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy", + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments" + }, + "createDiscussionInOrg": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "org": { "required": true, "type": "string" }, + "private": { "type": "boolean" }, + "team_slug": { "required": true, "type": "string" }, + "title": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions" + }, + "createDiscussionLegacy": { + "deprecated": "octokit.teams.createDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy", + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "private": { "type": "boolean" }, + "team_id": { "required": true, "type": "integer" }, + "title": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/discussions" + }, + "delete": { + "deprecated": "octokit.teams.delete() has been renamed to octokit.teams.deleteLegacy() (2020-01-16)", + "method": "DELETE", + "params": { "team_id": { "required": true, "type": "integer" } }, + "url": "/teams/:team_id" + }, + "deleteDiscussion": { + "deprecated": "octokit.teams.deleteDiscussion() has been renamed to octokit.teams.deleteDiscussionLegacy() (2020-01-16)", + "method": "DELETE", + "params": { + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "deleteDiscussionComment": { + "deprecated": "octokit.teams.deleteDiscussionComment() has been renamed to octokit.teams.deleteDiscussionCommentLegacy() (2020-01-16)", + "method": "DELETE", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + "deleteDiscussionCommentInOrg": { + "method": "DELETE", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number" + }, + "deleteDiscussionCommentLegacy": { + "deprecated": "octokit.teams.deleteDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy", + "method": "DELETE", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + "deleteDiscussionInOrg": { + "method": "DELETE", + "params": { + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number" + }, + "deleteDiscussionLegacy": { + "deprecated": "octokit.teams.deleteDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy", + "method": "DELETE", + "params": { + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "deleteInOrg": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug" + }, + "deleteLegacy": { + "deprecated": "octokit.teams.deleteLegacy() is deprecated, see https://developer.github.com/v3/teams/#delete-team-legacy", + "method": "DELETE", + "params": { "team_id": { "required": true, "type": "integer" } }, + "url": "/teams/:team_id" + }, + "get": { + "deprecated": "octokit.teams.get() has been renamed to octokit.teams.getLegacy() (2020-01-16)", + "method": "GET", + "params": { "team_id": { "required": true, "type": "integer" } }, + "url": "/teams/:team_id" + }, + "getByName": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug" + }, + "getDiscussion": { + "deprecated": "octokit.teams.getDiscussion() has been renamed to octokit.teams.getDiscussionLegacy() (2020-01-16)", + "method": "GET", + "params": { + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "getDiscussionComment": { + "deprecated": "octokit.teams.getDiscussionComment() has been renamed to octokit.teams.getDiscussionCommentLegacy() (2020-01-16)", + "method": "GET", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + "getDiscussionCommentInOrg": { + "method": "GET", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number" + }, + "getDiscussionCommentLegacy": { + "deprecated": "octokit.teams.getDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy", + "method": "GET", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + "getDiscussionInOrg": { + "method": "GET", + "params": { + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number" + }, + "getDiscussionLegacy": { + "deprecated": "octokit.teams.getDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy", + "method": "GET", + "params": { + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "getLegacy": { + "deprecated": "octokit.teams.getLegacy() is deprecated, see https://developer.github.com/v3/teams/#get-team-legacy", + "method": "GET", + "params": { "team_id": { "required": true, "type": "integer" } }, + "url": "/teams/:team_id" + }, + "getMember": { + "deprecated": "octokit.teams.getMember() has been renamed to octokit.teams.getMemberLegacy() (2020-01-16)", + "method": "GET", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/members/:username" + }, + "getMemberLegacy": { + "deprecated": "octokit.teams.getMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member-legacy", + "method": "GET", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/members/:username" + }, + "getMembership": { + "deprecated": "octokit.teams.getMembership() has been renamed to octokit.teams.getMembershipLegacy() (2020-01-16)", + "method": "GET", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/memberships/:username" + }, + "getMembershipInOrg": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/memberships/:username" + }, + "getMembershipLegacy": { + "deprecated": "octokit.teams.getMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-membership-legacy", + "method": "GET", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/memberships/:username" + }, + "list": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/teams" + }, + "listChild": { + "deprecated": "octokit.teams.listChild() has been renamed to octokit.teams.listChildLegacy() (2020-01-16)", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/teams" + }, + "listChildInOrg": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/teams" + }, + "listChildLegacy": { + "deprecated": "octokit.teams.listChildLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-child-teams-legacy", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/teams" + }, + "listDiscussionComments": { + "deprecated": "octokit.teams.listDiscussionComments() has been renamed to octokit.teams.listDiscussionCommentsLegacy() (2020-01-16)", + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments" + }, + "listDiscussionCommentsInOrg": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments" + }, + "listDiscussionCommentsLegacy": { + "deprecated": "octokit.teams.listDiscussionCommentsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy", + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments" + }, + "listDiscussions": { + "deprecated": "octokit.teams.listDiscussions() has been renamed to octokit.teams.listDiscussionsLegacy() (2020-01-16)", + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions" + }, + "listDiscussionsInOrg": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions" + }, + "listDiscussionsLegacy": { + "deprecated": "octokit.teams.listDiscussionsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#list-discussions-legacy", + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions" + }, + "listForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/teams" + }, + "listMembers": { + "deprecated": "octokit.teams.listMembers() has been renamed to octokit.teams.listMembersLegacy() (2020-01-16)", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "role": { "enum": ["member", "maintainer", "all"], "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/members" + }, + "listMembersInOrg": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "role": { "enum": ["member", "maintainer", "all"], "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/members" + }, + "listMembersLegacy": { + "deprecated": "octokit.teams.listMembersLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-team-members-legacy", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "role": { "enum": ["member", "maintainer", "all"], "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/members" + }, + "listPendingInvitations": { + "deprecated": "octokit.teams.listPendingInvitations() has been renamed to octokit.teams.listPendingInvitationsLegacy() (2020-01-16)", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/invitations" + }, + "listPendingInvitationsInOrg": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/invitations" + }, + "listPendingInvitationsLegacy": { + "deprecated": "octokit.teams.listPendingInvitationsLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/invitations" + }, + "listProjects": { + "deprecated": "octokit.teams.listProjects() has been renamed to octokit.teams.listProjectsLegacy() (2020-01-16)", + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects" + }, + "listProjectsInOrg": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/projects" + }, + "listProjectsLegacy": { + "deprecated": "octokit.teams.listProjectsLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-projects-legacy", + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects" + }, + "listRepos": { + "deprecated": "octokit.teams.listRepos() has been renamed to octokit.teams.listReposLegacy() (2020-01-16)", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos" + }, + "listReposInOrg": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/repos" + }, + "listReposLegacy": { + "deprecated": "octokit.teams.listReposLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-repos-legacy", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos" + }, + "removeMember": { + "deprecated": "octokit.teams.removeMember() has been renamed to octokit.teams.removeMemberLegacy() (2020-01-16)", + "method": "DELETE", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/members/:username" + }, + "removeMemberLegacy": { + "deprecated": "octokit.teams.removeMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member-legacy", + "method": "DELETE", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/members/:username" + }, + "removeMembership": { + "deprecated": "octokit.teams.removeMembership() has been renamed to octokit.teams.removeMembershipLegacy() (2020-01-16)", + "method": "DELETE", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/memberships/:username" + }, + "removeMembershipInOrg": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/memberships/:username" + }, + "removeMembershipLegacy": { + "deprecated": "octokit.teams.removeMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-membership-legacy", + "method": "DELETE", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/memberships/:username" + }, + "removeProject": { + "deprecated": "octokit.teams.removeProject() has been renamed to octokit.teams.removeProjectLegacy() (2020-01-16)", + "method": "DELETE", + "params": { + "project_id": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects/:project_id" + }, + "removeProjectInOrg": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "project_id": { "required": true, "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/projects/:project_id" + }, + "removeProjectLegacy": { + "deprecated": "octokit.teams.removeProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-project-legacy", + "method": "DELETE", + "params": { + "project_id": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects/:project_id" + }, + "removeRepo": { + "deprecated": "octokit.teams.removeRepo() has been renamed to octokit.teams.removeRepoLegacy() (2020-01-16)", + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos/:owner/:repo" + }, + "removeRepoInOrg": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/repos/:owner/:repo" + }, + "removeRepoLegacy": { + "deprecated": "octokit.teams.removeRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-repository-legacy", + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos/:owner/:repo" + }, + "reviewProject": { + "deprecated": "octokit.teams.reviewProject() has been renamed to octokit.teams.reviewProjectLegacy() (2020-01-16)", + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "project_id": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects/:project_id" + }, + "reviewProjectInOrg": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "project_id": { "required": true, "type": "integer" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/projects/:project_id" + }, + "reviewProjectLegacy": { + "deprecated": "octokit.teams.reviewProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#review-a-team-project-legacy", + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "project_id": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects/:project_id" + }, + "update": { + "deprecated": "octokit.teams.update() has been renamed to octokit.teams.updateLegacy() (2020-01-16)", + "method": "PATCH", + "params": { + "description": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "parent_team_id": { "type": "integer" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "privacy": { "enum": ["secret", "closed"], "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id" + }, + "updateDiscussion": { + "deprecated": "octokit.teams.updateDiscussion() has been renamed to octokit.teams.updateDiscussionLegacy() (2020-01-16)", + "method": "PATCH", + "params": { + "body": { "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" }, + "title": { "type": "string" } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "updateDiscussionComment": { + "deprecated": "octokit.teams.updateDiscussionComment() has been renamed to octokit.teams.updateDiscussionCommentLegacy() (2020-01-16)", + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + "updateDiscussionCommentInOrg": { + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number" + }, + "updateDiscussionCommentLegacy": { + "deprecated": "octokit.teams.updateDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy", + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + "updateDiscussionInOrg": { + "method": "PATCH", + "params": { + "body": { "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" }, + "title": { "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug/discussions/:discussion_number" + }, + "updateDiscussionLegacy": { + "deprecated": "octokit.teams.updateDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy", + "method": "PATCH", + "params": { + "body": { "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" }, + "title": { "type": "string" } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "updateInOrg": { + "method": "PATCH", + "params": { + "description": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "org": { "required": true, "type": "string" }, + "parent_team_id": { "type": "integer" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "privacy": { "enum": ["secret", "closed"], "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug" + }, + "updateLegacy": { + "deprecated": "octokit.teams.updateLegacy() is deprecated, see https://developer.github.com/v3/teams/#edit-team-legacy", + "method": "PATCH", + "params": { + "description": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "parent_team_id": { "type": "integer" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "privacy": { "enum": ["secret", "closed"], "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id" + } + }, + "users": { + "addEmails": { + "method": "POST", + "params": { "emails": { "required": true, "type": "string[]" } }, + "url": "/user/emails" + }, + "block": { + "method": "PUT", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/blocks/:username" + }, + "checkBlocked": { + "method": "GET", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/blocks/:username" + }, + "checkFollowing": { + "method": "GET", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/following/:username" + }, + "checkFollowingForUser": { + "method": "GET", + "params": { + "target_user": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/following/:target_user" + }, + "createGpgKey": { + "method": "POST", + "params": { "armored_public_key": { "type": "string" } }, + "url": "/user/gpg_keys" + }, + "createPublicKey": { + "method": "POST", + "params": { "key": { "type": "string" }, "title": { "type": "string" } }, + "url": "/user/keys" + }, + "deleteEmails": { + "method": "DELETE", + "params": { "emails": { "required": true, "type": "string[]" } }, + "url": "/user/emails" + }, + "deleteGpgKey": { + "method": "DELETE", + "params": { "gpg_key_id": { "required": true, "type": "integer" } }, + "url": "/user/gpg_keys/:gpg_key_id" + }, + "deletePublicKey": { + "method": "DELETE", + "params": { "key_id": { "required": true, "type": "integer" } }, + "url": "/user/keys/:key_id" + }, + "follow": { + "method": "PUT", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/following/:username" + }, + "getAuthenticated": { "method": "GET", "params": {}, "url": "/user" }, + "getByUsername": { + "method": "GET", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/users/:username" + }, + "getContextForUser": { + "method": "GET", + "params": { + "subject_id": { "type": "string" }, + "subject_type": { + "enum": ["organization", "repository", "issue", "pull_request"], + "type": "string" + }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/hovercard" + }, + "getGpgKey": { + "method": "GET", + "params": { "gpg_key_id": { "required": true, "type": "integer" } }, + "url": "/user/gpg_keys/:gpg_key_id" + }, + "getPublicKey": { + "method": "GET", + "params": { "key_id": { "required": true, "type": "integer" } }, + "url": "/user/keys/:key_id" + }, + "list": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/users" + }, + "listBlocked": { "method": "GET", "params": {}, "url": "/user/blocks" }, + "listEmails": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/emails" + }, + "listFollowersForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/followers" + }, + "listFollowersForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/followers" + }, + "listFollowingForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/following" + }, + "listFollowingForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/following" + }, + "listGpgKeys": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/gpg_keys" + }, + "listGpgKeysForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/gpg_keys" + }, + "listPublicEmails": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/public_emails" + }, + "listPublicKeys": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/keys" + }, + "listPublicKeysForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/keys" + }, + "togglePrimaryEmailVisibility": { + "method": "PATCH", + "params": { + "email": { "required": true, "type": "string" }, + "visibility": { "required": true, "type": "string" } + }, + "url": "/user/email/visibility" + }, + "unblock": { + "method": "DELETE", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/blocks/:username" + }, + "unfollow": { + "method": "DELETE", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/following/:username" + }, + "updateAuthenticated": { + "method": "PATCH", + "params": { + "bio": { "type": "string" }, + "blog": { "type": "string" }, + "company": { "type": "string" }, + "email": { "type": "string" }, + "hireable": { "type": "boolean" }, + "location": { "type": "string" }, + "name": { "type": "string" } + }, + "url": "/user" + } + } +} diff --git a/node_modules/@octokit/rest/plugins/validate/index.js b/node_modules/@octokit/rest/plugins/validate/index.js new file mode 100644 index 00000000..99547510 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/validate/index.js @@ -0,0 +1,7 @@ +module.exports = octokitValidate; + +const validate = require("./validate"); + +function octokitValidate(octokit) { + octokit.hook.before("request", validate.bind(null, octokit)); +} diff --git a/node_modules/@octokit/rest/plugins/validate/validate.js b/node_modules/@octokit/rest/plugins/validate/validate.js new file mode 100644 index 00000000..00b30082 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/validate/validate.js @@ -0,0 +1,151 @@ +"use strict"; + +module.exports = validate; + +const { RequestError } = require("@octokit/request-error"); +const get = require("lodash.get"); +const set = require("lodash.set"); + +function validate(octokit, options) { + if (!options.request.validate) { + return; + } + const { validate: params } = options.request; + + Object.keys(params).forEach(parameterName => { + const parameter = get(params, parameterName); + + const expectedType = parameter.type; + let parentParameterName; + let parentValue; + let parentParamIsPresent = true; + let parentParameterIsArray = false; + + if (/\./.test(parameterName)) { + parentParameterName = parameterName.replace(/\.[^.]+$/, ""); + parentParameterIsArray = parentParameterName.slice(-2) === "[]"; + if (parentParameterIsArray) { + parentParameterName = parentParameterName.slice(0, -2); + } + parentValue = get(options, parentParameterName); + parentParamIsPresent = + parentParameterName === "headers" || + (typeof parentValue === "object" && parentValue !== null); + } + + const values = parentParameterIsArray + ? (get(options, parentParameterName) || []).map( + value => value[parameterName.split(/\./).pop()] + ) + : [get(options, parameterName)]; + + values.forEach((value, i) => { + const valueIsPresent = typeof value !== "undefined"; + const valueIsNull = value === null; + const currentParameterName = parentParameterIsArray + ? parameterName.replace(/\[\]/, `[${i}]`) + : parameterName; + + if (!parameter.required && !valueIsPresent) { + return; + } + + // if the parent parameter is of type object but allows null + // then the child parameters can be ignored + if (!parentParamIsPresent) { + return; + } + + if (parameter.allowNull && valueIsNull) { + return; + } + + if (!parameter.allowNull && valueIsNull) { + throw new RequestError( + `'${currentParameterName}' cannot be null`, + 400, + { + request: options + } + ); + } + + if (parameter.required && !valueIsPresent) { + throw new RequestError( + `Empty value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + + // parse to integer before checking for enum + // so that string "1" will match enum with number 1 + if (expectedType === "integer") { + const unparsedValue = value; + value = parseInt(value, 10); + if (isNaN(value)) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + unparsedValue + )} is NaN`, + 400, + { + request: options + } + ); + } + } + + if (parameter.enum && parameter.enum.indexOf(String(value)) === -1) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + + if (parameter.validation) { + const regex = new RegExp(parameter.validation); + if (!regex.test(value)) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + } + + if (expectedType === "object" && typeof value === "string") { + try { + value = JSON.parse(value); + } catch (exception) { + throw new RequestError( + `JSON parse error of value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + } + + set(options, parameter.mapTo || currentParameterName, value); + }); + }); + + return options; +} diff --git a/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/types/LICENSE new file mode 100644 index 00000000..57bee5f1 --- /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 00000000..482dae00 --- /dev/null +++ b/node_modules/@octokit/types/README.md @@ -0,0 +1,19 @@ +# 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) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/types.ts.svg)](https://greenkeeper.io/) + +## Usage + +See https://octokit.github.io/types.ts for all exported types + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/types/package.json b/node_modules/@octokit/types/package.json new file mode 100644 index 00000000..af5bad0b --- /dev/null +++ b/node_modules/@octokit/types/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "@octokit/types@2.1.1", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@octokit/types@2.1.1", + "_id": "@octokit/types@2.1.1", + "_inBundle": false, + "_integrity": "sha512-89LOYH+d/vsbDX785NOfLxTW88GjNd0lWRz1DVPVsZgg9Yett5O+3MOvwo7iHgvUwbFz0mf/yPIjBkUbs4kxoQ==", + "_location": "/@octokit/types", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/types@2.1.1", + "name": "@octokit/types", + "escapedName": "@octokit%2ftypes", + "scope": "@octokit", + "rawSpec": "2.1.1", + "saveSpec": null, + "fetchSpec": "2.1.1" + }, + "_requiredBy": [ + "/@octokit/auth-token", + "/@octokit/endpoint", + "/@octokit/graphql", + "/@octokit/request", + "/@octokit/request-error" + ], + "_resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.1.1.tgz", + "_spec": "2.1.1", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Gregor Martynus", + "url": "https://twitter.com/gr2m" + }, + "bugs": { + "url": "https://github.com/octokit/types.ts/issues" + }, + "dependencies": { + "@types/node": ">= 8" + }, + "description": "Shared TypeScript definitions for Octokit projects", + "devDependencies": { + "@octokit/graphql": "^4.2.2", + "handlebars": "^4.4.5", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "prettier": "^1.18.2", + "semantic-release": "^16.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.0.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.16.0", + "typescript": "^3.6.4" + }, + "files": [ + "src/" + ], + "homepage": "https://github.com/octokit/types.ts#readme", + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "license": "MIT", + "main": "src/index.ts", + "name": "@octokit/types", + "publishConfig": { + "access": "public" + }, + "release": { + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github", + "@semantic-release/npm", + [ + "semantic-release-plugin-update-version-in-files", + { + "files": [ + "src/VERSION.ts" + ] + } + ] + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/types.ts.git" + }, + "scripts": { + "docs": "typedoc --module commonjs --readme none --out docs src/", + "lint": "prettier --check '{src,test}/**/*' README.md package.json !src/generated/*", + "lint:fix": "prettier --write '{src,test}/**/*' README.md package.json !src/generated/*", + "pretest": "npm run -s lint", + "test": "tsc --noEmit --declaration src/index.ts", + "update-endpoints": "npm-run-all update-endpoints:*", + "update-endpoints:fetch-json": "node scripts/update-endpoints/fetch-json", + "update-endpoints:typescript": "node scripts/update-endpoints/typescript" + }, + "version": "2.1.1" +} diff --git a/node_modules/@octokit/types/src/AuthInterface.ts b/node_modules/@octokit/types/src/AuthInterface.ts new file mode 100644 index 00000000..8f587436 --- /dev/null +++ b/node_modules/@octokit/types/src/AuthInterface.ts @@ -0,0 +1,43 @@ +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< + AuthOptions extends any[], + Authentication extends any +> { + (...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< + OctokitResponse + >; + + /** + * 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/src/EndpointDefaults.ts b/node_modules/@octokit/types/src/EndpointDefaults.ts new file mode 100644 index 00000000..024f6ebb --- /dev/null +++ b/node_modules/@octokit/types/src/EndpointDefaults.ts @@ -0,0 +1,22 @@ +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 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/src/EndpointInterface.ts b/node_modules/@octokit/types/src/EndpointInterface.ts new file mode 100644 index 00000000..fee78d61 --- /dev/null +++ b/node_modules/@octokit/types/src/EndpointInterface.ts @@ -0,0 +1,74 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { EndpointOptions } from "./EndpointOptions"; +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 `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: EndpointOptions): RequestOptions; + + /** + * 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, + options?: R extends keyof Endpoints + ? Endpoints[R][0] & RequestParameters + : RequestParameters + ): R extends keyof Endpoints ? Endpoints[R][1] : RequestOptions; + + /** + * Object with current default route and parameters + */ + DEFAULTS: EndpointDefaults; + + /** + * Returns a new `endpoint` with updated route and parameters + */ + defaults: (newDefaults: RequestParameters) => 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: Route, parameters?: RequestParameters): EndpointDefaults; + + /** + * 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: RequestParameters): EndpointDefaults; + + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): 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: EndpointDefaults) => RequestOptions; +} diff --git a/node_modules/@octokit/types/src/EndpointOptions.ts b/node_modules/@octokit/types/src/EndpointOptions.ts new file mode 100644 index 00000000..01706049 --- /dev/null +++ b/node_modules/@octokit/types/src/EndpointOptions.ts @@ -0,0 +1,8 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; + +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/types/src/Fetch.ts b/node_modules/@octokit/types/src/Fetch.ts new file mode 100644 index 00000000..983c79be --- /dev/null +++ b/node_modules/@octokit/types/src/Fetch.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/types/src/OctokitResponse.ts b/node_modules/@octokit/types/src/OctokitResponse.ts new file mode 100644 index 00000000..4cec20d9 --- /dev/null +++ b/node_modules/@octokit/types/src/OctokitResponse.ts @@ -0,0 +1,18 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; + +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: number; + /** + * URL of response after all redirects + */ + url: Url; + /** + * This is the data you would see in https://developer.Octokit.com/v3/ + */ + data: T; +}; diff --git a/node_modules/@octokit/types/src/RequestHeaders.ts b/node_modules/@octokit/types/src/RequestHeaders.ts new file mode 100644 index 00000000..0df66361 --- /dev/null +++ b/node_modules/@octokit/types/src/RequestHeaders.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option instead. + */ + accept?: string; + /** + * Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678` + */ + authorization?: string; + /** + * `user-agent` is set do a default and can be overwritten as needed. + */ + "user-agent"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/types/src/RequestInterface.ts b/node_modules/@octokit/types/src/RequestInterface.ts new file mode 100644 index 00000000..bc4c74fc --- /dev/null +++ b/node_modules/@octokit/types/src/RequestInterface.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; + +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: EndpointOptions): 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: Route, parameters?: RequestParameters): Promise< + OctokitResponse + >; + + /** + * Returns a new `endpoint` with updated route and parameters + */ + defaults: (newDefaults: RequestParameters) => RequestInterface; + + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/types/src/RequestMethod.ts b/node_modules/@octokit/types/src/RequestMethod.ts new file mode 100644 index 00000000..2910435a --- /dev/null +++ b/node_modules/@octokit/types/src/RequestMethod.ts @@ -0,0 +1,10 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = + | "DELETE" + | "GET" + | "HEAD" + | "PATCH" + | "POST" + | "PUT"; diff --git a/node_modules/@octokit/types/src/RequestOptions.ts b/node_modules/@octokit/types/src/RequestOptions.ts new file mode 100644 index 00000000..4d765c09 --- /dev/null +++ b/node_modules/@octokit/types/src/RequestOptions.ts @@ -0,0 +1,15 @@ +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 type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/types/src/RequestParameters.ts b/node_modules/@octokit/types/src/RequestParameters.ts new file mode 100644 index 00000000..9766be00 --- /dev/null +++ b/node_modules/@octokit/types/src/RequestParameters.ts @@ -0,0 +1,46 @@ +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 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]: any; +}; diff --git a/node_modules/@octokit/types/src/RequestRequestOptions.ts b/node_modules/@octokit/types/src/RequestRequestOptions.ts new file mode 100644 index 00000000..028d6f72 --- /dev/null +++ b/node_modules/@octokit/types/src/RequestRequestOptions.ts @@ -0,0 +1,27 @@ +import { Agent } from "http"; +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 type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + */ + agent?: Agent; + /** + * 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/src/ResponseHeaders.ts b/node_modules/@octokit/types/src/ResponseHeaders.ts new file mode 100644 index 00000000..17267b60 --- /dev/null +++ b/node_modules/@octokit/types/src/ResponseHeaders.ts @@ -0,0 +1,21 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-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/src/Route.ts b/node_modules/@octokit/types/src/Route.ts new file mode 100644 index 00000000..c5229a8b --- /dev/null +++ b/node_modules/@octokit/types/src/Route.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/:org'`, `'PUT /orgs/:org'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/types/src/Signal.ts b/node_modules/@octokit/types/src/Signal.ts new file mode 100644 index 00000000..bdf97001 --- /dev/null +++ b/node_modules/@octokit/types/src/Signal.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/types/src/StrategyInterface.ts b/node_modules/@octokit/types/src/StrategyInterface.ts new file mode 100644 index 00000000..60a55add --- /dev/null +++ b/node_modules/@octokit/types/src/StrategyInterface.ts @@ -0,0 +1,9 @@ +import { AuthInterface } from "./AuthInterface"; + +export interface StrategyInterface< + StrategyOptions extends any[], + AuthOptions extends any[], + Authentication extends object +> { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/types/src/Url.ts b/node_modules/@octokit/types/src/Url.ts new file mode 100644 index 00000000..9d228cbf --- /dev/null +++ b/node_modules/@octokit/types/src/Url.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/types/src/VERSION.ts b/node_modules/@octokit/types/src/VERSION.ts new file mode 100644 index 00000000..b74d9912 --- /dev/null +++ b/node_modules/@octokit/types/src/VERSION.ts @@ -0,0 +1 @@ +export const VERSION = "2.1.1"; diff --git a/node_modules/@octokit/types/src/generated/Endpoints.ts b/node_modules/@octokit/types/src/generated/Endpoints.ts new file mode 100644 index 00000000..4137f27e --- /dev/null +++ b/node_modules/@octokit/types/src/generated/Endpoints.ts @@ -0,0 +1,16306 @@ +// DO NOT EDIT THIS FILE +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +import { Url } from "../Url"; + +export interface Endpoints { + "DELETE /app/installations/:installation_id": [ + AppsDeleteInstallationEndpoint, + AppsDeleteInstallationRequestOptions + ]; + "DELETE /applications/:client_id/grant": [ + AppsDeleteAuthorizationEndpoint, + AppsDeleteAuthorizationRequestOptions + ]; + "DELETE /applications/:client_id/grants/:access_token": [ + + | AppsRevokeGrantForApplicationEndpoint + | OauthAuthorizationsRevokeGrantForApplicationEndpoint, + + | AppsRevokeGrantForApplicationRequestOptions + | OauthAuthorizationsRevokeGrantForApplicationRequestOptions + ]; + "DELETE /applications/:client_id/token": [ + AppsDeleteTokenEndpoint, + AppsDeleteTokenRequestOptions + ]; + "DELETE /applications/:client_id/tokens/:access_token": [ + + | AppsRevokeAuthorizationForApplicationEndpoint + | OauthAuthorizationsRevokeAuthorizationForApplicationEndpoint, + + | AppsRevokeAuthorizationForApplicationRequestOptions + | OauthAuthorizationsRevokeAuthorizationForApplicationRequestOptions + ]; + "DELETE /applications/grants/:grant_id": [ + OauthAuthorizationsDeleteGrantEndpoint, + OauthAuthorizationsDeleteGrantRequestOptions + ]; + "DELETE /authorizations/:authorization_id": [ + OauthAuthorizationsDeleteAuthorizationEndpoint, + OauthAuthorizationsDeleteAuthorizationRequestOptions + ]; + "DELETE /gists/:gist_id": [GistsDeleteEndpoint, GistsDeleteRequestOptions]; + "DELETE /gists/:gist_id/comments/:comment_id": [ + GistsDeleteCommentEndpoint, + GistsDeleteCommentRequestOptions + ]; + "DELETE /gists/:gist_id/star": [ + GistsUnstarEndpoint, + GistsUnstarRequestOptions + ]; + "DELETE /installation/token": [ + AppsRevokeInstallationTokenEndpoint, + AppsRevokeInstallationTokenRequestOptions + ]; + "DELETE /notifications/threads/:thread_id/subscription": [ + ActivityDeleteThreadSubscriptionEndpoint, + ActivityDeleteThreadSubscriptionRequestOptions + ]; + "DELETE /orgs/:org/blocks/:username": [ + OrgsUnblockUserEndpoint, + OrgsUnblockUserRequestOptions + ]; + "DELETE /orgs/:org/credential-authorizations/:credential_id": [ + OrgsRemoveCredentialAuthorizationEndpoint, + OrgsRemoveCredentialAuthorizationRequestOptions + ]; + "DELETE /orgs/:org/hooks/:hook_id": [ + OrgsDeleteHookEndpoint, + OrgsDeleteHookRequestOptions + ]; + "DELETE /orgs/:org/interaction-limits": [ + InteractionsRemoveRestrictionsForOrgEndpoint, + InteractionsRemoveRestrictionsForOrgRequestOptions + ]; + "DELETE /orgs/:org/members/:username": [ + OrgsRemoveMemberEndpoint, + OrgsRemoveMemberRequestOptions + ]; + "DELETE /orgs/:org/memberships/:username": [ + OrgsRemoveMembershipEndpoint, + OrgsRemoveMembershipRequestOptions + ]; + "DELETE /orgs/:org/migrations/:migration_id/archive": [ + MigrationsDeleteArchiveForOrgEndpoint, + MigrationsDeleteArchiveForOrgRequestOptions + ]; + "DELETE /orgs/:org/migrations/:migration_id/repos/:repo_name/lock": [ + MigrationsUnlockRepoForOrgEndpoint, + MigrationsUnlockRepoForOrgRequestOptions + ]; + "DELETE /orgs/:org/outside_collaborators/:username": [ + OrgsRemoveOutsideCollaboratorEndpoint, + OrgsRemoveOutsideCollaboratorRequestOptions + ]; + "DELETE /orgs/:org/public_members/:username": [ + OrgsConcealMembershipEndpoint, + OrgsConcealMembershipRequestOptions + ]; + "DELETE /orgs/:org/teams/:team_slug": [ + TeamsDeleteInOrgEndpoint, + TeamsDeleteInOrgRequestOptions + ]; + "DELETE /orgs/:org/teams/:team_slug/discussions/:discussion_number": [ + TeamsDeleteDiscussionInOrgEndpoint, + TeamsDeleteDiscussionInOrgRequestOptions + ]; + "DELETE /orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number": [ + TeamsDeleteDiscussionCommentInOrgEndpoint, + TeamsDeleteDiscussionCommentInOrgRequestOptions + ]; + "DELETE /orgs/:org/teams/:team_slug/memberships/:username": [ + TeamsRemoveMembershipInOrgEndpoint, + TeamsRemoveMembershipInOrgRequestOptions + ]; + "DELETE /orgs/:org/teams/:team_slug/projects/:project_id": [ + TeamsRemoveProjectInOrgEndpoint, + TeamsRemoveProjectInOrgRequestOptions + ]; + "DELETE /orgs/:org/teams/:team_slug/repos/:owner/:repo": [ + TeamsRemoveRepoInOrgEndpoint, + TeamsRemoveRepoInOrgRequestOptions + ]; + "DELETE /projects/:project_id": [ + ProjectsDeleteEndpoint, + ProjectsDeleteRequestOptions + ]; + "DELETE /projects/:project_id/collaborators/:username": [ + ProjectsRemoveCollaboratorEndpoint, + ProjectsRemoveCollaboratorRequestOptions + ]; + "DELETE /projects/columns/:column_id": [ + ProjectsDeleteColumnEndpoint, + ProjectsDeleteColumnRequestOptions + ]; + "DELETE /projects/columns/cards/:card_id": [ + ProjectsDeleteCardEndpoint, + ProjectsDeleteCardRequestOptions + ]; + "DELETE /reactions/:reaction_id": [ + ReactionsDeleteEndpoint, + ReactionsDeleteRequestOptions + ]; + "DELETE /repos/:owner/:repo": [ + ReposDeleteEndpoint, + ReposDeleteRequestOptions + ]; + "DELETE /repos/:owner/:repo/automated-security-fixes": [ + ReposDisableAutomatedSecurityFixesEndpoint, + ReposDisableAutomatedSecurityFixesRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection": [ + ReposRemoveBranchProtectionEndpoint, + ReposRemoveBranchProtectionRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ + ReposRemoveProtectedBranchAdminEnforcementEndpoint, + ReposRemoveProtectedBranchAdminEnforcementRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ + ReposRemoveProtectedBranchPullRequestReviewEnforcementEndpoint, + ReposRemoveProtectedBranchPullRequestReviewEnforcementRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ + ReposRemoveProtectedBranchRequiredSignaturesEndpoint, + ReposRemoveProtectedBranchRequiredSignaturesRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ + ReposRemoveProtectedBranchRequiredStatusChecksEndpoint, + ReposRemoveProtectedBranchRequiredStatusChecksRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ + ReposRemoveProtectedBranchRequiredStatusChecksContextsEndpoint, + ReposRemoveProtectedBranchRequiredStatusChecksContextsRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions": [ + ReposRemoveProtectedBranchRestrictionsEndpoint, + ReposRemoveProtectedBranchRestrictionsRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/apps": [ + ReposRemoveProtectedBranchAppRestrictionsEndpoint, + ReposRemoveProtectedBranchAppRestrictionsRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ + ReposRemoveProtectedBranchTeamRestrictionsEndpoint, + ReposRemoveProtectedBranchTeamRestrictionsRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ + ReposRemoveProtectedBranchUserRestrictionsEndpoint, + ReposRemoveProtectedBranchUserRestrictionsRequestOptions + ]; + "DELETE /repos/:owner/:repo/collaborators/:username": [ + ReposRemoveCollaboratorEndpoint, + ReposRemoveCollaboratorRequestOptions + ]; + "DELETE /repos/:owner/:repo/comments/:comment_id": [ + ReposDeleteCommitCommentEndpoint, + ReposDeleteCommitCommentRequestOptions + ]; + "DELETE /repos/:owner/:repo/contents/:path": [ + ReposDeleteFileEndpoint, + ReposDeleteFileRequestOptions + ]; + "DELETE /repos/:owner/:repo/downloads/:download_id": [ + ReposDeleteDownloadEndpoint, + ReposDeleteDownloadRequestOptions + ]; + "DELETE /repos/:owner/:repo/git/refs/:ref": [ + GitDeleteRefEndpoint, + GitDeleteRefRequestOptions + ]; + "DELETE /repos/:owner/:repo/hooks/:hook_id": [ + ReposDeleteHookEndpoint, + ReposDeleteHookRequestOptions + ]; + "DELETE /repos/:owner/:repo/import": [ + MigrationsCancelImportEndpoint, + MigrationsCancelImportRequestOptions + ]; + "DELETE /repos/:owner/:repo/interaction-limits": [ + InteractionsRemoveRestrictionsForRepoEndpoint, + InteractionsRemoveRestrictionsForRepoRequestOptions + ]; + "DELETE /repos/:owner/:repo/invitations/:invitation_id": [ + ReposDeleteInvitationEndpoint, + ReposDeleteInvitationRequestOptions + ]; + "DELETE /repos/:owner/:repo/issues/:issue_number/assignees": [ + IssuesRemoveAssigneesEndpoint, + IssuesRemoveAssigneesRequestOptions + ]; + "DELETE /repos/:owner/:repo/issues/:issue_number/labels": [ + IssuesRemoveLabelsEndpoint, + IssuesRemoveLabelsRequestOptions + ]; + "DELETE /repos/:owner/:repo/issues/:issue_number/labels/:name": [ + IssuesRemoveLabelEndpoint, + IssuesRemoveLabelRequestOptions + ]; + "DELETE /repos/:owner/:repo/issues/:issue_number/lock": [ + IssuesUnlockEndpoint, + IssuesUnlockRequestOptions + ]; + "DELETE /repos/:owner/:repo/issues/comments/:comment_id": [ + IssuesDeleteCommentEndpoint, + IssuesDeleteCommentRequestOptions + ]; + "DELETE /repos/:owner/:repo/keys/:key_id": [ + ReposRemoveDeployKeyEndpoint, + ReposRemoveDeployKeyRequestOptions + ]; + "DELETE /repos/:owner/:repo/labels/:name": [ + IssuesDeleteLabelEndpoint, + IssuesDeleteLabelRequestOptions + ]; + "DELETE /repos/:owner/:repo/milestones/:milestone_number": [ + IssuesDeleteMilestoneEndpoint, + IssuesDeleteMilestoneRequestOptions + ]; + "DELETE /repos/:owner/:repo/pages": [ + ReposDisablePagesSiteEndpoint, + ReposDisablePagesSiteRequestOptions + ]; + "DELETE /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [ + PullsDeleteReviewRequestEndpoint, + PullsDeleteReviewRequestRequestOptions + ]; + "DELETE /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [ + PullsDeletePendingReviewEndpoint, + PullsDeletePendingReviewRequestOptions + ]; + "DELETE /repos/:owner/:repo/pulls/comments/:comment_id": [ + PullsDeleteCommentEndpoint, + PullsDeleteCommentRequestOptions + ]; + "DELETE /repos/:owner/:repo/releases/:release_id": [ + ReposDeleteReleaseEndpoint, + ReposDeleteReleaseRequestOptions + ]; + "DELETE /repos/:owner/:repo/releases/assets/:asset_id": [ + ReposDeleteReleaseAssetEndpoint, + ReposDeleteReleaseAssetRequestOptions + ]; + "DELETE /repos/:owner/:repo/subscription": [ + ActivityDeleteRepoSubscriptionEndpoint, + ActivityDeleteRepoSubscriptionRequestOptions + ]; + "DELETE /repos/:owner/:repo/vulnerability-alerts": [ + ReposDisableVulnerabilityAlertsEndpoint, + ReposDisableVulnerabilityAlertsRequestOptions + ]; + "DELETE /scim/v2/organizations/:org/Users/:scim_user_id": [ + ScimRemoveUserFromOrgEndpoint, + ScimRemoveUserFromOrgRequestOptions + ]; + "DELETE /teams/:team_id": [ + TeamsDeleteLegacyEndpoint | TeamsDeleteEndpoint, + TeamsDeleteLegacyRequestOptions | TeamsDeleteRequestOptions + ]; + "DELETE /teams/:team_id/discussions/:discussion_number": [ + TeamsDeleteDiscussionLegacyEndpoint | TeamsDeleteDiscussionEndpoint, + + | TeamsDeleteDiscussionLegacyRequestOptions + | TeamsDeleteDiscussionRequestOptions + ]; + "DELETE /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [ + + | TeamsDeleteDiscussionCommentLegacyEndpoint + | TeamsDeleteDiscussionCommentEndpoint, + + | TeamsDeleteDiscussionCommentLegacyRequestOptions + | TeamsDeleteDiscussionCommentRequestOptions + ]; + "DELETE /teams/:team_id/members/:username": [ + TeamsRemoveMemberLegacyEndpoint, + TeamsRemoveMemberLegacyRequestOptions + ]; + "DELETE /teams/:team_id/memberships/:username": [ + TeamsRemoveMembershipLegacyEndpoint, + TeamsRemoveMembershipLegacyRequestOptions + ]; + "DELETE /teams/:team_id/projects/:project_id": [ + TeamsRemoveProjectLegacyEndpoint | TeamsRemoveProjectEndpoint, + TeamsRemoveProjectLegacyRequestOptions | TeamsRemoveProjectRequestOptions + ]; + "DELETE /teams/:team_id/repos/:owner/:repo": [ + TeamsRemoveRepoLegacyEndpoint | TeamsRemoveRepoEndpoint, + TeamsRemoveRepoLegacyRequestOptions | TeamsRemoveRepoRequestOptions + ]; + "DELETE /user/blocks/:username": [ + UsersUnblockEndpoint, + UsersUnblockRequestOptions + ]; + "DELETE /user/emails": [ + UsersDeleteEmailsEndpoint, + UsersDeleteEmailsRequestOptions + ]; + "DELETE /user/following/:username": [ + UsersUnfollowEndpoint, + UsersUnfollowRequestOptions + ]; + "DELETE /user/gpg_keys/:gpg_key_id": [ + UsersDeleteGpgKeyEndpoint, + UsersDeleteGpgKeyRequestOptions + ]; + "DELETE /user/installations/:installation_id/repositories/:repository_id": [ + AppsRemoveRepoFromInstallationEndpoint, + AppsRemoveRepoFromInstallationRequestOptions + ]; + "DELETE /user/keys/:key_id": [ + UsersDeletePublicKeyEndpoint, + UsersDeletePublicKeyRequestOptions + ]; + "DELETE /user/migrations/:migration_id/archive": [ + MigrationsDeleteArchiveForAuthenticatedUserEndpoint, + MigrationsDeleteArchiveForAuthenticatedUserRequestOptions + ]; + "DELETE /user/migrations/:migration_id/repos/:repo_name/lock": [ + MigrationsUnlockRepoForAuthenticatedUserEndpoint, + MigrationsUnlockRepoForAuthenticatedUserRequestOptions + ]; + "DELETE /user/repository_invitations/:invitation_id": [ + ReposDeclineInvitationEndpoint, + ReposDeclineInvitationRequestOptions + ]; + "DELETE /user/starred/:owner/:repo": [ + ActivityUnstarRepoEndpoint, + ActivityUnstarRepoRequestOptions + ]; + "DELETE /user/subscriptions/:owner/:repo": [ + ActivityStopWatchingRepoLegacyEndpoint, + ActivityStopWatchingRepoLegacyRequestOptions + ]; + "GET /app": [ + AppsGetAuthenticatedEndpoint, + AppsGetAuthenticatedRequestOptions + ]; + "GET /app/installations": [ + AppsListInstallationsEndpoint, + AppsListInstallationsRequestOptions + ]; + "GET /app/installations/:installation_id": [ + AppsGetInstallationEndpoint, + AppsGetInstallationRequestOptions + ]; + "GET /applications/:client_id/tokens/:access_token": [ + + | AppsCheckAuthorizationEndpoint + | OauthAuthorizationsCheckAuthorizationEndpoint, + + | AppsCheckAuthorizationRequestOptions + | OauthAuthorizationsCheckAuthorizationRequestOptions + ]; + "GET /applications/grants": [ + OauthAuthorizationsListGrantsEndpoint, + OauthAuthorizationsListGrantsRequestOptions + ]; + "GET /applications/grants/:grant_id": [ + OauthAuthorizationsGetGrantEndpoint, + OauthAuthorizationsGetGrantRequestOptions + ]; + "GET /apps/:app_slug": [AppsGetBySlugEndpoint, AppsGetBySlugRequestOptions]; + "GET /authorizations": [ + OauthAuthorizationsListAuthorizationsEndpoint, + OauthAuthorizationsListAuthorizationsRequestOptions + ]; + "GET /authorizations/:authorization_id": [ + OauthAuthorizationsGetAuthorizationEndpoint, + OauthAuthorizationsGetAuthorizationRequestOptions + ]; + "GET /codes_of_conduct": [ + CodesOfConductListConductCodesEndpoint, + CodesOfConductListConductCodesRequestOptions + ]; + "GET /codes_of_conduct/:key": [ + CodesOfConductGetConductCodeEndpoint, + CodesOfConductGetConductCodeRequestOptions + ]; + "GET /emojis": [EmojisGetEndpoint, EmojisGetRequestOptions]; + "GET /events": [ + ActivityListPublicEventsEndpoint, + ActivityListPublicEventsRequestOptions + ]; + "GET /feeds": [ActivityListFeedsEndpoint, ActivityListFeedsRequestOptions]; + "GET /gists": [GistsListEndpoint, GistsListRequestOptions]; + "GET /gists/:gist_id": [GistsGetEndpoint, GistsGetRequestOptions]; + "GET /gists/:gist_id/:sha": [ + GistsGetRevisionEndpoint, + GistsGetRevisionRequestOptions + ]; + "GET /gists/:gist_id/comments": [ + GistsListCommentsEndpoint, + GistsListCommentsRequestOptions + ]; + "GET /gists/:gist_id/comments/:comment_id": [ + GistsGetCommentEndpoint, + GistsGetCommentRequestOptions + ]; + "GET /gists/:gist_id/commits": [ + GistsListCommitsEndpoint, + GistsListCommitsRequestOptions + ]; + "GET /gists/:gist_id/forks": [ + GistsListForksEndpoint, + GistsListForksRequestOptions + ]; + "GET /gists/:gist_id/star": [ + GistsCheckIsStarredEndpoint, + GistsCheckIsStarredRequestOptions + ]; + "GET /gists/public": [GistsListPublicEndpoint, GistsListPublicRequestOptions]; + "GET /gists/starred": [ + GistsListStarredEndpoint, + GistsListStarredRequestOptions + ]; + "GET /gitignore/templates": [ + GitignoreListTemplatesEndpoint, + GitignoreListTemplatesRequestOptions + ]; + "GET /gitignore/templates/:name": [ + GitignoreGetTemplateEndpoint, + GitignoreGetTemplateRequestOptions + ]; + "GET /installation/repositories": [ + AppsListReposEndpoint, + AppsListReposRequestOptions + ]; + "GET /issues": [IssuesListEndpoint, IssuesListRequestOptions]; + "GET /legacy/issues/search/:owner/:repository/:state/:keyword": [ + SearchIssuesLegacyEndpoint, + SearchIssuesLegacyRequestOptions + ]; + "GET /legacy/repos/search/:keyword": [ + SearchReposLegacyEndpoint, + SearchReposLegacyRequestOptions + ]; + "GET /legacy/user/email/:email": [ + SearchEmailLegacyEndpoint, + SearchEmailLegacyRequestOptions + ]; + "GET /legacy/user/search/:keyword": [ + SearchUsersLegacyEndpoint, + SearchUsersLegacyRequestOptions + ]; + "GET /licenses": [ + LicensesListCommonlyUsedEndpoint | LicensesListEndpoint, + LicensesListCommonlyUsedRequestOptions | LicensesListRequestOptions + ]; + "GET /licenses/:license": [LicensesGetEndpoint, LicensesGetRequestOptions]; + "GET /marketplace_listing/accounts/:account_id": [ + AppsCheckAccountIsAssociatedWithAnyEndpoint, + AppsCheckAccountIsAssociatedWithAnyRequestOptions + ]; + "GET /marketplace_listing/plans": [ + AppsListPlansEndpoint, + AppsListPlansRequestOptions + ]; + "GET /marketplace_listing/plans/:plan_id/accounts": [ + AppsListAccountsUserOrOrgOnPlanEndpoint, + AppsListAccountsUserOrOrgOnPlanRequestOptions + ]; + "GET /marketplace_listing/stubbed/accounts/:account_id": [ + AppsCheckAccountIsAssociatedWithAnyStubbedEndpoint, + AppsCheckAccountIsAssociatedWithAnyStubbedRequestOptions + ]; + "GET /marketplace_listing/stubbed/plans": [ + AppsListPlansStubbedEndpoint, + AppsListPlansStubbedRequestOptions + ]; + "GET /marketplace_listing/stubbed/plans/:plan_id/accounts": [ + AppsListAccountsUserOrOrgOnPlanStubbedEndpoint, + AppsListAccountsUserOrOrgOnPlanStubbedRequestOptions + ]; + "GET /meta": [MetaGetEndpoint, MetaGetRequestOptions]; + "GET /networks/:owner/:repo/events": [ + ActivityListPublicEventsForRepoNetworkEndpoint, + ActivityListPublicEventsForRepoNetworkRequestOptions + ]; + "GET /notifications": [ + ActivityListNotificationsEndpoint, + ActivityListNotificationsRequestOptions + ]; + "GET /notifications/threads/:thread_id": [ + ActivityGetThreadEndpoint, + ActivityGetThreadRequestOptions + ]; + "GET /notifications/threads/:thread_id/subscription": [ + ActivityGetThreadSubscriptionEndpoint, + ActivityGetThreadSubscriptionRequestOptions + ]; + "GET /organizations": [OrgsListEndpoint, OrgsListRequestOptions]; + "GET /orgs/:org": [OrgsGetEndpoint, OrgsGetRequestOptions]; + "GET /orgs/:org/blocks": [ + OrgsListBlockedUsersEndpoint, + OrgsListBlockedUsersRequestOptions + ]; + "GET /orgs/:org/blocks/:username": [ + OrgsCheckBlockedUserEndpoint, + OrgsCheckBlockedUserRequestOptions + ]; + "GET /orgs/:org/credential-authorizations": [ + OrgsListCredentialAuthorizationsEndpoint, + OrgsListCredentialAuthorizationsRequestOptions + ]; + "GET /orgs/:org/events": [ + ActivityListPublicEventsForOrgEndpoint, + ActivityListPublicEventsForOrgRequestOptions + ]; + "GET /orgs/:org/hooks": [OrgsListHooksEndpoint, OrgsListHooksRequestOptions]; + "GET /orgs/:org/hooks/:hook_id": [ + OrgsGetHookEndpoint, + OrgsGetHookRequestOptions + ]; + "GET /orgs/:org/installation": [ + AppsGetOrgInstallationEndpoint | AppsFindOrgInstallationEndpoint, + AppsGetOrgInstallationRequestOptions | AppsFindOrgInstallationRequestOptions + ]; + "GET /orgs/:org/installations": [ + OrgsListInstallationsEndpoint, + OrgsListInstallationsRequestOptions + ]; + "GET /orgs/:org/interaction-limits": [ + InteractionsGetRestrictionsForOrgEndpoint, + InteractionsGetRestrictionsForOrgRequestOptions + ]; + "GET /orgs/:org/invitations": [ + OrgsListPendingInvitationsEndpoint, + OrgsListPendingInvitationsRequestOptions + ]; + "GET /orgs/:org/invitations/:invitation_id/teams": [ + OrgsListInvitationTeamsEndpoint, + OrgsListInvitationTeamsRequestOptions + ]; + "GET /orgs/:org/issues": [ + IssuesListForOrgEndpoint, + IssuesListForOrgRequestOptions + ]; + "GET /orgs/:org/members": [ + OrgsListMembersEndpoint, + OrgsListMembersRequestOptions + ]; + "GET /orgs/:org/members/:username": [ + OrgsCheckMembershipEndpoint, + OrgsCheckMembershipRequestOptions + ]; + "GET /orgs/:org/memberships/:username": [ + OrgsGetMembershipEndpoint, + OrgsGetMembershipRequestOptions + ]; + "GET /orgs/:org/migrations": [ + MigrationsListForOrgEndpoint, + MigrationsListForOrgRequestOptions + ]; + "GET /orgs/:org/migrations/:migration_id": [ + MigrationsGetStatusForOrgEndpoint, + MigrationsGetStatusForOrgRequestOptions + ]; + "GET /orgs/:org/migrations/:migration_id/archive": [ + MigrationsGetArchiveForOrgEndpoint, + MigrationsGetArchiveForOrgRequestOptions + ]; + "GET /orgs/:org/migrations/:migration_id/repositories": [ + MigrationsListReposForOrgEndpoint, + MigrationsListReposForOrgRequestOptions + ]; + "GET /orgs/:org/outside_collaborators": [ + OrgsListOutsideCollaboratorsEndpoint, + OrgsListOutsideCollaboratorsRequestOptions + ]; + "GET /orgs/:org/projects": [ + ProjectsListForOrgEndpoint, + ProjectsListForOrgRequestOptions + ]; + "GET /orgs/:org/public_members": [ + OrgsListPublicMembersEndpoint, + OrgsListPublicMembersRequestOptions + ]; + "GET /orgs/:org/public_members/:username": [ + OrgsCheckPublicMembershipEndpoint, + OrgsCheckPublicMembershipRequestOptions + ]; + "GET /orgs/:org/repos": [ + ReposListForOrgEndpoint, + ReposListForOrgRequestOptions + ]; + "GET /orgs/:org/team-sync/groups": [ + TeamsListIdPGroupsForOrgEndpoint, + TeamsListIdPGroupsForOrgRequestOptions + ]; + "GET /orgs/:org/teams": [TeamsListEndpoint, TeamsListRequestOptions]; + "GET /orgs/:org/teams/:team_slug": [ + TeamsGetByNameEndpoint, + TeamsGetByNameRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/discussions": [ + TeamsListDiscussionsInOrgEndpoint, + TeamsListDiscussionsInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/discussions/:discussion_number": [ + TeamsGetDiscussionInOrgEndpoint, + TeamsGetDiscussionInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/discussions/:discussion_number/comments": [ + TeamsListDiscussionCommentsInOrgEndpoint, + TeamsListDiscussionCommentsInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number": [ + TeamsGetDiscussionCommentInOrgEndpoint, + TeamsGetDiscussionCommentInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions": [ + ReactionsListForTeamDiscussionCommentInOrgEndpoint, + ReactionsListForTeamDiscussionCommentInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions": [ + ReactionsListForTeamDiscussionInOrgEndpoint, + ReactionsListForTeamDiscussionInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/invitations": [ + TeamsListPendingInvitationsInOrgEndpoint, + TeamsListPendingInvitationsInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/members": [ + TeamsListMembersInOrgEndpoint, + TeamsListMembersInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/memberships/:username": [ + TeamsGetMembershipInOrgEndpoint, + TeamsGetMembershipInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/projects": [ + TeamsListProjectsInOrgEndpoint, + TeamsListProjectsInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/projects/:project_id": [ + TeamsReviewProjectInOrgEndpoint, + TeamsReviewProjectInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/repos": [ + TeamsListReposInOrgEndpoint, + TeamsListReposInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/repos/:owner/:repo": [ + TeamsCheckManagesRepoInOrgEndpoint, + TeamsCheckManagesRepoInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/team-sync/group-mappings": [ + TeamsListIdPGroupsInOrgEndpoint, + TeamsListIdPGroupsInOrgRequestOptions + ]; + "GET /orgs/:org/teams/:team_slug/teams": [ + TeamsListChildInOrgEndpoint, + TeamsListChildInOrgRequestOptions + ]; + "GET /projects/:project_id": [ProjectsGetEndpoint, ProjectsGetRequestOptions]; + "GET /projects/:project_id/collaborators": [ + ProjectsListCollaboratorsEndpoint, + ProjectsListCollaboratorsRequestOptions + ]; + "GET /projects/:project_id/collaborators/:username/permission": [ + ProjectsReviewUserPermissionLevelEndpoint, + ProjectsReviewUserPermissionLevelRequestOptions + ]; + "GET /projects/:project_id/columns": [ + ProjectsListColumnsEndpoint, + ProjectsListColumnsRequestOptions + ]; + "GET /projects/columns/:column_id": [ + ProjectsGetColumnEndpoint, + ProjectsGetColumnRequestOptions + ]; + "GET /projects/columns/:column_id/cards": [ + ProjectsListCardsEndpoint, + ProjectsListCardsRequestOptions + ]; + "GET /projects/columns/cards/:card_id": [ + ProjectsGetCardEndpoint, + ProjectsGetCardRequestOptions + ]; + "GET /rate_limit": [RateLimitGetEndpoint, RateLimitGetRequestOptions]; + "GET /repos/:owner/:repo": [ReposGetEndpoint, ReposGetRequestOptions]; + "GET /repos/:owner/:repo/:archive_format/:ref": [ + ReposGetArchiveLinkEndpoint, + ReposGetArchiveLinkRequestOptions + ]; + "GET /repos/:owner/:repo/assignees": [ + IssuesListAssigneesEndpoint, + IssuesListAssigneesRequestOptions + ]; + "GET /repos/:owner/:repo/assignees/:assignee": [ + IssuesCheckAssigneeEndpoint, + IssuesCheckAssigneeRequestOptions + ]; + "GET /repos/:owner/:repo/branches": [ + ReposListBranchesEndpoint, + ReposListBranchesRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch": [ + ReposGetBranchEndpoint, + ReposGetBranchRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection": [ + ReposGetBranchProtectionEndpoint, + ReposGetBranchProtectionRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ + ReposGetProtectedBranchAdminEnforcementEndpoint, + ReposGetProtectedBranchAdminEnforcementRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ + ReposGetProtectedBranchPullRequestReviewEnforcementEndpoint, + ReposGetProtectedBranchPullRequestReviewEnforcementRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ + ReposGetProtectedBranchRequiredSignaturesEndpoint, + ReposGetProtectedBranchRequiredSignaturesRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ + ReposGetProtectedBranchRequiredStatusChecksEndpoint, + ReposGetProtectedBranchRequiredStatusChecksRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ + ReposListProtectedBranchRequiredStatusChecksContextsEndpoint, + ReposListProtectedBranchRequiredStatusChecksContextsRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions": [ + ReposGetProtectedBranchRestrictionsEndpoint, + ReposGetProtectedBranchRestrictionsRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions/apps": [ + + | ReposGetAppsWithAccessToProtectedBranchEndpoint + | ReposListAppsWithAccessToProtectedBranchEndpoint, + + | ReposGetAppsWithAccessToProtectedBranchRequestOptions + | ReposListAppsWithAccessToProtectedBranchRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ + + | ReposGetTeamsWithAccessToProtectedBranchEndpoint + | ReposListProtectedBranchTeamRestrictionsEndpoint + | ReposListTeamsWithAccessToProtectedBranchEndpoint, + + | ReposGetTeamsWithAccessToProtectedBranchRequestOptions + | ReposListProtectedBranchTeamRestrictionsRequestOptions + | ReposListTeamsWithAccessToProtectedBranchRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ + + | ReposGetUsersWithAccessToProtectedBranchEndpoint + | ReposListProtectedBranchUserRestrictionsEndpoint + | ReposListUsersWithAccessToProtectedBranchEndpoint, + + | ReposGetUsersWithAccessToProtectedBranchRequestOptions + | ReposListProtectedBranchUserRestrictionsRequestOptions + | ReposListUsersWithAccessToProtectedBranchRequestOptions + ]; + "GET /repos/:owner/:repo/check-runs/:check_run_id": [ + ChecksGetEndpoint, + ChecksGetRequestOptions + ]; + "GET /repos/:owner/:repo/check-runs/:check_run_id/annotations": [ + ChecksListAnnotationsEndpoint, + ChecksListAnnotationsRequestOptions + ]; + "GET /repos/:owner/:repo/check-suites/:check_suite_id": [ + ChecksGetSuiteEndpoint, + ChecksGetSuiteRequestOptions + ]; + "GET /repos/:owner/:repo/check-suites/:check_suite_id/check-runs": [ + ChecksListForSuiteEndpoint, + ChecksListForSuiteRequestOptions + ]; + "GET /repos/:owner/:repo/collaborators": [ + ReposListCollaboratorsEndpoint, + ReposListCollaboratorsRequestOptions + ]; + "GET /repos/:owner/:repo/collaborators/:username": [ + ReposCheckCollaboratorEndpoint, + ReposCheckCollaboratorRequestOptions + ]; + "GET /repos/:owner/:repo/collaborators/:username/permission": [ + ReposGetCollaboratorPermissionLevelEndpoint, + ReposGetCollaboratorPermissionLevelRequestOptions + ]; + "GET /repos/:owner/:repo/comments": [ + ReposListCommitCommentsEndpoint, + ReposListCommitCommentsRequestOptions + ]; + "GET /repos/:owner/:repo/comments/:comment_id": [ + ReposGetCommitCommentEndpoint, + ReposGetCommitCommentRequestOptions + ]; + "GET /repos/:owner/:repo/comments/:comment_id/reactions": [ + ReactionsListForCommitCommentEndpoint, + ReactionsListForCommitCommentRequestOptions + ]; + "GET /repos/:owner/:repo/commits": [ + ReposListCommitsEndpoint, + ReposListCommitsRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:commit_sha/branches-where-head": [ + ReposListBranchesForHeadCommitEndpoint, + ReposListBranchesForHeadCommitRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:commit_sha/comments": [ + ReposListCommentsForCommitEndpoint, + ReposListCommentsForCommitRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:commit_sha/pulls": [ + ReposListPullRequestsAssociatedWithCommitEndpoint, + ReposListPullRequestsAssociatedWithCommitRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:ref": [ + ReposGetCommitEndpoint, + ReposGetCommitRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:ref/check-runs": [ + ChecksListForRefEndpoint, + ChecksListForRefRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:ref/check-suites": [ + ChecksListSuitesForRefEndpoint, + ChecksListSuitesForRefRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:ref/status": [ + ReposGetCombinedStatusForRefEndpoint, + ReposGetCombinedStatusForRefRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:ref/statuses": [ + ReposListStatusesForRefEndpoint, + ReposListStatusesForRefRequestOptions + ]; + "GET /repos/:owner/:repo/community/code_of_conduct": [ + CodesOfConductGetForRepoEndpoint, + CodesOfConductGetForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/community/profile": [ + ReposRetrieveCommunityProfileMetricsEndpoint, + ReposRetrieveCommunityProfileMetricsRequestOptions + ]; + "GET /repos/:owner/:repo/compare/:base...:head": [ + ReposCompareCommitsEndpoint, + ReposCompareCommitsRequestOptions + ]; + "GET /repos/:owner/:repo/contents/:path": [ + ReposGetContentsEndpoint, + ReposGetContentsRequestOptions + ]; + "GET /repos/:owner/:repo/contributors": [ + ReposListContributorsEndpoint, + ReposListContributorsRequestOptions + ]; + "GET /repos/:owner/:repo/deployments": [ + ReposListDeploymentsEndpoint, + ReposListDeploymentsRequestOptions + ]; + "GET /repos/:owner/:repo/deployments/:deployment_id": [ + ReposGetDeploymentEndpoint, + ReposGetDeploymentRequestOptions + ]; + "GET /repos/:owner/:repo/deployments/:deployment_id/statuses": [ + ReposListDeploymentStatusesEndpoint, + ReposListDeploymentStatusesRequestOptions + ]; + "GET /repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id": [ + ReposGetDeploymentStatusEndpoint, + ReposGetDeploymentStatusRequestOptions + ]; + "GET /repos/:owner/:repo/downloads": [ + ReposListDownloadsEndpoint, + ReposListDownloadsRequestOptions + ]; + "GET /repos/:owner/:repo/downloads/:download_id": [ + ReposGetDownloadEndpoint, + ReposGetDownloadRequestOptions + ]; + "GET /repos/:owner/:repo/events": [ + ActivityListRepoEventsEndpoint, + ActivityListRepoEventsRequestOptions + ]; + "GET /repos/:owner/:repo/forks": [ + ReposListForksEndpoint, + ReposListForksRequestOptions + ]; + "GET /repos/:owner/:repo/git/blobs/:file_sha": [ + GitGetBlobEndpoint, + GitGetBlobRequestOptions + ]; + "GET /repos/:owner/:repo/git/commits/:commit_sha": [ + GitGetCommitEndpoint, + GitGetCommitRequestOptions + ]; + "GET /repos/:owner/:repo/git/matching-refs/:ref": [ + GitListMatchingRefsEndpoint, + GitListMatchingRefsRequestOptions + ]; + "GET /repos/:owner/:repo/git/ref/:ref": [ + GitGetRefEndpoint, + GitGetRefRequestOptions + ]; + "GET /repos/:owner/:repo/git/tags/:tag_sha": [ + GitGetTagEndpoint, + GitGetTagRequestOptions + ]; + "GET /repos/:owner/:repo/git/trees/:tree_sha": [ + GitGetTreeEndpoint, + GitGetTreeRequestOptions + ]; + "GET /repos/:owner/:repo/hooks": [ + ReposListHooksEndpoint, + ReposListHooksRequestOptions + ]; + "GET /repos/:owner/:repo/hooks/:hook_id": [ + ReposGetHookEndpoint, + ReposGetHookRequestOptions + ]; + "GET /repos/:owner/:repo/import": [ + MigrationsGetImportProgressEndpoint, + MigrationsGetImportProgressRequestOptions + ]; + "GET /repos/:owner/:repo/import/authors": [ + MigrationsGetCommitAuthorsEndpoint, + MigrationsGetCommitAuthorsRequestOptions + ]; + "GET /repos/:owner/:repo/import/large_files": [ + MigrationsGetLargeFilesEndpoint, + MigrationsGetLargeFilesRequestOptions + ]; + "GET /repos/:owner/:repo/installation": [ + AppsGetRepoInstallationEndpoint | AppsFindRepoInstallationEndpoint, + + | AppsGetRepoInstallationRequestOptions + | AppsFindRepoInstallationRequestOptions + ]; + "GET /repos/:owner/:repo/interaction-limits": [ + InteractionsGetRestrictionsForRepoEndpoint, + InteractionsGetRestrictionsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/invitations": [ + ReposListInvitationsEndpoint, + ReposListInvitationsRequestOptions + ]; + "GET /repos/:owner/:repo/issues": [ + IssuesListForRepoEndpoint, + IssuesListForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number": [ + IssuesGetEndpoint, + IssuesGetRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number/comments": [ + IssuesListCommentsEndpoint, + IssuesListCommentsRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number/events": [ + IssuesListEventsEndpoint, + IssuesListEventsRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number/labels": [ + IssuesListLabelsOnIssueEndpoint, + IssuesListLabelsOnIssueRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number/reactions": [ + ReactionsListForIssueEndpoint, + ReactionsListForIssueRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number/timeline": [ + IssuesListEventsForTimelineEndpoint, + IssuesListEventsForTimelineRequestOptions + ]; + "GET /repos/:owner/:repo/issues/comments": [ + IssuesListCommentsForRepoEndpoint, + IssuesListCommentsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/issues/comments/:comment_id": [ + IssuesGetCommentEndpoint, + IssuesGetCommentRequestOptions + ]; + "GET /repos/:owner/:repo/issues/comments/:comment_id/reactions": [ + ReactionsListForIssueCommentEndpoint, + ReactionsListForIssueCommentRequestOptions + ]; + "GET /repos/:owner/:repo/issues/events": [ + IssuesListEventsForRepoEndpoint, + IssuesListEventsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/issues/events/:event_id": [ + IssuesGetEventEndpoint, + IssuesGetEventRequestOptions + ]; + "GET /repos/:owner/:repo/keys": [ + ReposListDeployKeysEndpoint, + ReposListDeployKeysRequestOptions + ]; + "GET /repos/:owner/:repo/keys/:key_id": [ + ReposGetDeployKeyEndpoint, + ReposGetDeployKeyRequestOptions + ]; + "GET /repos/:owner/:repo/labels": [ + IssuesListLabelsForRepoEndpoint, + IssuesListLabelsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/labels/:name": [ + IssuesGetLabelEndpoint, + IssuesGetLabelRequestOptions + ]; + "GET /repos/:owner/:repo/languages": [ + ReposListLanguagesEndpoint, + ReposListLanguagesRequestOptions + ]; + "GET /repos/:owner/:repo/license": [ + LicensesGetForRepoEndpoint, + LicensesGetForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/milestones": [ + IssuesListMilestonesForRepoEndpoint, + IssuesListMilestonesForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/milestones/:milestone_number": [ + IssuesGetMilestoneEndpoint, + IssuesGetMilestoneRequestOptions + ]; + "GET /repos/:owner/:repo/milestones/:milestone_number/labels": [ + IssuesListLabelsForMilestoneEndpoint, + IssuesListLabelsForMilestoneRequestOptions + ]; + "GET /repos/:owner/:repo/notifications": [ + ActivityListNotificationsForRepoEndpoint, + ActivityListNotificationsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/pages": [ + ReposGetPagesEndpoint, + ReposGetPagesRequestOptions + ]; + "GET /repos/:owner/:repo/pages/builds": [ + ReposListPagesBuildsEndpoint, + ReposListPagesBuildsRequestOptions + ]; + "GET /repos/:owner/:repo/pages/builds/:build_id": [ + ReposGetPagesBuildEndpoint, + ReposGetPagesBuildRequestOptions + ]; + "GET /repos/:owner/:repo/pages/builds/latest": [ + ReposGetLatestPagesBuildEndpoint, + ReposGetLatestPagesBuildRequestOptions + ]; + "GET /repos/:owner/:repo/projects": [ + ProjectsListForRepoEndpoint, + ProjectsListForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/pulls": [PullsListEndpoint, PullsListRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number": [ + PullsGetEndpoint, + PullsGetRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/comments": [ + PullsListCommentsEndpoint, + PullsListCommentsRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/commits": [ + PullsListCommitsEndpoint, + PullsListCommitsRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/files": [ + PullsListFilesEndpoint, + PullsListFilesRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/merge": [ + PullsCheckIfMergedEndpoint, + PullsCheckIfMergedRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [ + PullsListReviewRequestsEndpoint, + PullsListReviewRequestsRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/reviews": [ + PullsListReviewsEndpoint, + PullsListReviewsRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [ + PullsGetReviewEndpoint, + PullsGetReviewRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments": [ + PullsGetCommentsForReviewEndpoint, + PullsGetCommentsForReviewRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/comments": [ + PullsListCommentsForRepoEndpoint, + PullsListCommentsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/comments/:comment_id": [ + PullsGetCommentEndpoint, + PullsGetCommentRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/comments/:comment_id/reactions": [ + ReactionsListForPullRequestReviewCommentEndpoint, + ReactionsListForPullRequestReviewCommentRequestOptions + ]; + "GET /repos/:owner/:repo/readme": [ + ReposGetReadmeEndpoint, + ReposGetReadmeRequestOptions + ]; + "GET /repos/:owner/:repo/releases": [ + ReposListReleasesEndpoint, + ReposListReleasesRequestOptions + ]; + "GET /repos/:owner/:repo/releases/:release_id": [ + ReposGetReleaseEndpoint, + ReposGetReleaseRequestOptions + ]; + "GET /repos/:owner/:repo/releases/:release_id/assets": [ + ReposListAssetsForReleaseEndpoint, + ReposListAssetsForReleaseRequestOptions + ]; + "GET /repos/:owner/:repo/releases/assets/:asset_id": [ + ReposGetReleaseAssetEndpoint, + ReposGetReleaseAssetRequestOptions + ]; + "GET /repos/:owner/:repo/releases/latest": [ + ReposGetLatestReleaseEndpoint, + ReposGetLatestReleaseRequestOptions + ]; + "GET /repos/:owner/:repo/releases/tags/:tag": [ + ReposGetReleaseByTagEndpoint, + ReposGetReleaseByTagRequestOptions + ]; + "GET /repos/:owner/:repo/stargazers": [ + ActivityListStargazersForRepoEndpoint, + ActivityListStargazersForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/stats/code_frequency": [ + ReposGetCodeFrequencyStatsEndpoint, + ReposGetCodeFrequencyStatsRequestOptions + ]; + "GET /repos/:owner/:repo/stats/commit_activity": [ + ReposGetCommitActivityStatsEndpoint, + ReposGetCommitActivityStatsRequestOptions + ]; + "GET /repos/:owner/:repo/stats/contributors": [ + ReposGetContributorsStatsEndpoint, + ReposGetContributorsStatsRequestOptions + ]; + "GET /repos/:owner/:repo/stats/participation": [ + ReposGetParticipationStatsEndpoint, + ReposGetParticipationStatsRequestOptions + ]; + "GET /repos/:owner/:repo/stats/punch_card": [ + ReposGetPunchCardStatsEndpoint, + ReposGetPunchCardStatsRequestOptions + ]; + "GET /repos/:owner/:repo/subscribers": [ + ActivityListWatchersForRepoEndpoint, + ActivityListWatchersForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/subscription": [ + ActivityGetRepoSubscriptionEndpoint, + ActivityGetRepoSubscriptionRequestOptions + ]; + "GET /repos/:owner/:repo/tags": [ + ReposListTagsEndpoint, + ReposListTagsRequestOptions + ]; + "GET /repos/:owner/:repo/teams": [ + ReposListTeamsEndpoint, + ReposListTeamsRequestOptions + ]; + "GET /repos/:owner/:repo/topics": [ + ReposListTopicsEndpoint, + ReposListTopicsRequestOptions + ]; + "GET /repos/:owner/:repo/traffic/clones": [ + ReposGetClonesEndpoint, + ReposGetClonesRequestOptions + ]; + "GET /repos/:owner/:repo/traffic/popular/paths": [ + ReposGetTopPathsEndpoint, + ReposGetTopPathsRequestOptions + ]; + "GET /repos/:owner/:repo/traffic/popular/referrers": [ + ReposGetTopReferrersEndpoint, + ReposGetTopReferrersRequestOptions + ]; + "GET /repos/:owner/:repo/traffic/views": [ + ReposGetViewsEndpoint, + ReposGetViewsRequestOptions + ]; + "GET /repos/:owner/:repo/vulnerability-alerts": [ + ReposCheckVulnerabilityAlertsEndpoint, + ReposCheckVulnerabilityAlertsRequestOptions + ]; + "GET /repositories": [ReposListPublicEndpoint, ReposListPublicRequestOptions]; + "GET /scim/v2/organizations/:org/Users": [ + ScimListProvisionedIdentitiesEndpoint, + ScimListProvisionedIdentitiesRequestOptions + ]; + "GET /scim/v2/organizations/:org/Users/:scim_user_id": [ + ScimGetProvisioningDetailsForUserEndpoint, + ScimGetProvisioningDetailsForUserRequestOptions + ]; + "GET /search/code": [SearchCodeEndpoint, SearchCodeRequestOptions]; + "GET /search/commits": [SearchCommitsEndpoint, SearchCommitsRequestOptions]; + "GET /search/issues": [ + SearchIssuesAndPullRequestsEndpoint | SearchIssuesEndpoint, + SearchIssuesAndPullRequestsRequestOptions | SearchIssuesRequestOptions + ]; + "GET /search/labels": [SearchLabelsEndpoint, SearchLabelsRequestOptions]; + "GET /search/repositories": [SearchReposEndpoint, SearchReposRequestOptions]; + "GET /search/topics": [SearchTopicsEndpoint, SearchTopicsRequestOptions]; + "GET /search/users": [SearchUsersEndpoint, SearchUsersRequestOptions]; + "GET /teams/:team_id": [ + TeamsGetLegacyEndpoint | TeamsGetEndpoint, + TeamsGetLegacyRequestOptions | TeamsGetRequestOptions + ]; + "GET /teams/:team_id/discussions": [ + TeamsListDiscussionsLegacyEndpoint | TeamsListDiscussionsEndpoint, + + | TeamsListDiscussionsLegacyRequestOptions + | TeamsListDiscussionsRequestOptions + ]; + "GET /teams/:team_id/discussions/:discussion_number": [ + TeamsGetDiscussionLegacyEndpoint | TeamsGetDiscussionEndpoint, + TeamsGetDiscussionLegacyRequestOptions | TeamsGetDiscussionRequestOptions + ]; + "GET /teams/:team_id/discussions/:discussion_number/comments": [ + + | TeamsListDiscussionCommentsLegacyEndpoint + | TeamsListDiscussionCommentsEndpoint, + + | TeamsListDiscussionCommentsLegacyRequestOptions + | TeamsListDiscussionCommentsRequestOptions + ]; + "GET /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [ + TeamsGetDiscussionCommentLegacyEndpoint | TeamsGetDiscussionCommentEndpoint, + + | TeamsGetDiscussionCommentLegacyRequestOptions + | TeamsGetDiscussionCommentRequestOptions + ]; + "GET /teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions": [ + + | ReactionsListForTeamDiscussionCommentLegacyEndpoint + | ReactionsListForTeamDiscussionCommentEndpoint, + + | ReactionsListForTeamDiscussionCommentLegacyRequestOptions + | ReactionsListForTeamDiscussionCommentRequestOptions + ]; + "GET /teams/:team_id/discussions/:discussion_number/reactions": [ + + | ReactionsListForTeamDiscussionLegacyEndpoint + | ReactionsListForTeamDiscussionEndpoint, + + | ReactionsListForTeamDiscussionLegacyRequestOptions + | ReactionsListForTeamDiscussionRequestOptions + ]; + "GET /teams/:team_id/invitations": [ + + | TeamsListPendingInvitationsLegacyEndpoint + | TeamsListPendingInvitationsEndpoint, + + | TeamsListPendingInvitationsLegacyRequestOptions + | TeamsListPendingInvitationsRequestOptions + ]; + "GET /teams/:team_id/members": [ + TeamsListMembersLegacyEndpoint | TeamsListMembersEndpoint, + TeamsListMembersLegacyRequestOptions | TeamsListMembersRequestOptions + ]; + "GET /teams/:team_id/members/:username": [ + TeamsGetMemberLegacyEndpoint | TeamsGetMemberEndpoint, + TeamsGetMemberLegacyRequestOptions | TeamsGetMemberRequestOptions + ]; + "GET /teams/:team_id/memberships/:username": [ + TeamsGetMembershipLegacyEndpoint | TeamsGetMembershipEndpoint, + TeamsGetMembershipLegacyRequestOptions | TeamsGetMembershipRequestOptions + ]; + "GET /teams/:team_id/projects": [ + TeamsListProjectsLegacyEndpoint | TeamsListProjectsEndpoint, + TeamsListProjectsLegacyRequestOptions | TeamsListProjectsRequestOptions + ]; + "GET /teams/:team_id/projects/:project_id": [ + TeamsReviewProjectLegacyEndpoint | TeamsReviewProjectEndpoint, + TeamsReviewProjectLegacyRequestOptions | TeamsReviewProjectRequestOptions + ]; + "GET /teams/:team_id/repos": [ + TeamsListReposLegacyEndpoint | TeamsListReposEndpoint, + TeamsListReposLegacyRequestOptions | TeamsListReposRequestOptions + ]; + "GET /teams/:team_id/repos/:owner/:repo": [ + TeamsCheckManagesRepoLegacyEndpoint | TeamsCheckManagesRepoEndpoint, + + | TeamsCheckManagesRepoLegacyRequestOptions + | TeamsCheckManagesRepoRequestOptions + ]; + "GET /teams/:team_id/team-sync/group-mappings": [ + TeamsListIdPGroupsForLegacyEndpoint | TeamsListIdPGroupsForEndpoint, + + | TeamsListIdPGroupsForLegacyRequestOptions + | TeamsListIdPGroupsForRequestOptions + ]; + "GET /teams/:team_id/teams": [ + TeamsListChildLegacyEndpoint | TeamsListChildEndpoint, + TeamsListChildLegacyRequestOptions | TeamsListChildRequestOptions + ]; + "GET /user": [ + UsersGetAuthenticatedEndpoint, + UsersGetAuthenticatedRequestOptions + ]; + "GET /user/:migration_id/repositories": [ + MigrationsListReposForUserEndpoint, + MigrationsListReposForUserRequestOptions + ]; + "GET /user/blocks": [ + UsersListBlockedEndpoint, + UsersListBlockedRequestOptions + ]; + "GET /user/blocks/:username": [ + UsersCheckBlockedEndpoint, + UsersCheckBlockedRequestOptions + ]; + "GET /user/emails": [UsersListEmailsEndpoint, UsersListEmailsRequestOptions]; + "GET /user/followers": [ + UsersListFollowersForAuthenticatedUserEndpoint, + UsersListFollowersForAuthenticatedUserRequestOptions + ]; + "GET /user/following": [ + UsersListFollowingForAuthenticatedUserEndpoint, + UsersListFollowingForAuthenticatedUserRequestOptions + ]; + "GET /user/following/:username": [ + UsersCheckFollowingEndpoint, + UsersCheckFollowingRequestOptions + ]; + "GET /user/gpg_keys": [ + UsersListGpgKeysEndpoint, + UsersListGpgKeysRequestOptions + ]; + "GET /user/gpg_keys/:gpg_key_id": [ + UsersGetGpgKeyEndpoint, + UsersGetGpgKeyRequestOptions + ]; + "GET /user/installations": [ + AppsListInstallationsForAuthenticatedUserEndpoint, + AppsListInstallationsForAuthenticatedUserRequestOptions + ]; + "GET /user/installations/:installation_id/repositories": [ + AppsListInstallationReposForAuthenticatedUserEndpoint, + AppsListInstallationReposForAuthenticatedUserRequestOptions + ]; + "GET /user/issues": [ + IssuesListForAuthenticatedUserEndpoint, + IssuesListForAuthenticatedUserRequestOptions + ]; + "GET /user/keys": [ + UsersListPublicKeysEndpoint, + UsersListPublicKeysRequestOptions + ]; + "GET /user/keys/:key_id": [ + UsersGetPublicKeyEndpoint, + UsersGetPublicKeyRequestOptions + ]; + "GET /user/marketplace_purchases": [ + AppsListMarketplacePurchasesForAuthenticatedUserEndpoint, + AppsListMarketplacePurchasesForAuthenticatedUserRequestOptions + ]; + "GET /user/marketplace_purchases/stubbed": [ + AppsListMarketplacePurchasesForAuthenticatedUserStubbedEndpoint, + AppsListMarketplacePurchasesForAuthenticatedUserStubbedRequestOptions + ]; + "GET /user/memberships/orgs": [ + OrgsListMembershipsEndpoint, + OrgsListMembershipsRequestOptions + ]; + "GET /user/memberships/orgs/:org": [ + OrgsGetMembershipForAuthenticatedUserEndpoint, + OrgsGetMembershipForAuthenticatedUserRequestOptions + ]; + "GET /user/migrations": [ + MigrationsListForAuthenticatedUserEndpoint, + MigrationsListForAuthenticatedUserRequestOptions + ]; + "GET /user/migrations/:migration_id": [ + MigrationsGetStatusForAuthenticatedUserEndpoint, + MigrationsGetStatusForAuthenticatedUserRequestOptions + ]; + "GET /user/migrations/:migration_id/archive": [ + MigrationsGetArchiveForAuthenticatedUserEndpoint, + MigrationsGetArchiveForAuthenticatedUserRequestOptions + ]; + "GET /user/orgs": [ + OrgsListForAuthenticatedUserEndpoint, + OrgsListForAuthenticatedUserRequestOptions + ]; + "GET /user/public_emails": [ + UsersListPublicEmailsEndpoint, + UsersListPublicEmailsRequestOptions + ]; + "GET /user/repos": [ReposListEndpoint, ReposListRequestOptions]; + "GET /user/repository_invitations": [ + ReposListInvitationsForAuthenticatedUserEndpoint, + ReposListInvitationsForAuthenticatedUserRequestOptions + ]; + "GET /user/starred": [ + ActivityListReposStarredByAuthenticatedUserEndpoint, + ActivityListReposStarredByAuthenticatedUserRequestOptions + ]; + "GET /user/starred/:owner/:repo": [ + ActivityCheckStarringRepoEndpoint, + ActivityCheckStarringRepoRequestOptions + ]; + "GET /user/subscriptions": [ + ActivityListWatchedReposForAuthenticatedUserEndpoint, + ActivityListWatchedReposForAuthenticatedUserRequestOptions + ]; + "GET /user/subscriptions/:owner/:repo": [ + ActivityCheckWatchingRepoLegacyEndpoint, + ActivityCheckWatchingRepoLegacyRequestOptions + ]; + "GET /user/teams": [ + TeamsListForAuthenticatedUserEndpoint, + TeamsListForAuthenticatedUserRequestOptions + ]; + "GET /users": [UsersListEndpoint, UsersListRequestOptions]; + "GET /users/:username": [ + UsersGetByUsernameEndpoint, + UsersGetByUsernameRequestOptions + ]; + "GET /users/:username/events": [ + ActivityListEventsForUserEndpoint, + ActivityListEventsForUserRequestOptions + ]; + "GET /users/:username/events/orgs/:org": [ + ActivityListEventsForOrgEndpoint, + ActivityListEventsForOrgRequestOptions + ]; + "GET /users/:username/events/public": [ + ActivityListPublicEventsForUserEndpoint, + ActivityListPublicEventsForUserRequestOptions + ]; + "GET /users/:username/followers": [ + UsersListFollowersForUserEndpoint, + UsersListFollowersForUserRequestOptions + ]; + "GET /users/:username/following": [ + UsersListFollowingForUserEndpoint, + UsersListFollowingForUserRequestOptions + ]; + "GET /users/:username/following/:target_user": [ + UsersCheckFollowingForUserEndpoint, + UsersCheckFollowingForUserRequestOptions + ]; + "GET /users/:username/gists": [ + GistsListPublicForUserEndpoint, + GistsListPublicForUserRequestOptions + ]; + "GET /users/:username/gpg_keys": [ + UsersListGpgKeysForUserEndpoint, + UsersListGpgKeysForUserRequestOptions + ]; + "GET /users/:username/hovercard": [ + UsersGetContextForUserEndpoint, + UsersGetContextForUserRequestOptions + ]; + "GET /users/:username/installation": [ + AppsGetUserInstallationEndpoint | AppsFindUserInstallationEndpoint, + + | AppsGetUserInstallationRequestOptions + | AppsFindUserInstallationRequestOptions + ]; + "GET /users/:username/keys": [ + UsersListPublicKeysForUserEndpoint, + UsersListPublicKeysForUserRequestOptions + ]; + "GET /users/:username/orgs": [ + OrgsListForUserEndpoint, + OrgsListForUserRequestOptions + ]; + "GET /users/:username/projects": [ + ProjectsListForUserEndpoint, + ProjectsListForUserRequestOptions + ]; + "GET /users/:username/received_events": [ + ActivityListReceivedEventsForUserEndpoint, + ActivityListReceivedEventsForUserRequestOptions + ]; + "GET /users/:username/received_events/public": [ + ActivityListReceivedPublicEventsForUserEndpoint, + ActivityListReceivedPublicEventsForUserRequestOptions + ]; + "GET /users/:username/repos": [ + ReposListForUserEndpoint, + ReposListForUserRequestOptions + ]; + "GET /users/:username/starred": [ + ActivityListReposStarredByUserEndpoint, + ActivityListReposStarredByUserRequestOptions + ]; + "GET /users/:username/subscriptions": [ + ActivityListReposWatchedByUserEndpoint, + ActivityListReposWatchedByUserRequestOptions + ]; + "PATCH /applications/:client_id/token": [ + AppsResetTokenEndpoint, + AppsResetTokenRequestOptions + ]; + "PATCH /authorizations/:authorization_id": [ + OauthAuthorizationsUpdateAuthorizationEndpoint, + OauthAuthorizationsUpdateAuthorizationRequestOptions + ]; + "PATCH /gists/:gist_id": [GistsUpdateEndpoint, GistsUpdateRequestOptions]; + "PATCH /gists/:gist_id/comments/:comment_id": [ + GistsUpdateCommentEndpoint, + GistsUpdateCommentRequestOptions + ]; + "PATCH /notifications/threads/:thread_id": [ + ActivityMarkThreadAsReadEndpoint, + ActivityMarkThreadAsReadRequestOptions + ]; + "PATCH /orgs/:org": [OrgsUpdateEndpoint, OrgsUpdateRequestOptions]; + "PATCH /orgs/:org/hooks/:hook_id": [ + OrgsUpdateHookEndpoint, + OrgsUpdateHookRequestOptions + ]; + "PATCH /orgs/:org/teams/:team_slug": [ + TeamsUpdateInOrgEndpoint, + TeamsUpdateInOrgRequestOptions + ]; + "PATCH /orgs/:org/teams/:team_slug/discussions/:discussion_number": [ + TeamsUpdateDiscussionInOrgEndpoint, + TeamsUpdateDiscussionInOrgRequestOptions + ]; + "PATCH /orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number": [ + TeamsUpdateDiscussionCommentInOrgEndpoint, + TeamsUpdateDiscussionCommentInOrgRequestOptions + ]; + "PATCH /orgs/:org/teams/:team_slug/team-sync/group-mappings": [ + TeamsCreateOrUpdateIdPGroupConnectionsInOrgEndpoint, + TeamsCreateOrUpdateIdPGroupConnectionsInOrgRequestOptions + ]; + "PATCH /projects/:project_id": [ + ProjectsUpdateEndpoint, + ProjectsUpdateRequestOptions + ]; + "PATCH /projects/columns/:column_id": [ + ProjectsUpdateColumnEndpoint, + ProjectsUpdateColumnRequestOptions + ]; + "PATCH /projects/columns/cards/:card_id": [ + ProjectsUpdateCardEndpoint, + ProjectsUpdateCardRequestOptions + ]; + "PATCH /repos/:owner/:repo": [ReposUpdateEndpoint, ReposUpdateRequestOptions]; + "PATCH /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ + ReposUpdateProtectedBranchPullRequestReviewEnforcementEndpoint, + ReposUpdateProtectedBranchPullRequestReviewEnforcementRequestOptions + ]; + "PATCH /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ + ReposUpdateProtectedBranchRequiredStatusChecksEndpoint, + ReposUpdateProtectedBranchRequiredStatusChecksRequestOptions + ]; + "PATCH /repos/:owner/:repo/check-runs/:check_run_id": [ + ChecksUpdateEndpoint, + ChecksUpdateRequestOptions + ]; + "PATCH /repos/:owner/:repo/check-suites/preferences": [ + ChecksSetSuitesPreferencesEndpoint, + ChecksSetSuitesPreferencesRequestOptions + ]; + "PATCH /repos/:owner/:repo/comments/:comment_id": [ + ReposUpdateCommitCommentEndpoint, + ReposUpdateCommitCommentRequestOptions + ]; + "PATCH /repos/:owner/:repo/git/refs/:ref": [ + GitUpdateRefEndpoint, + GitUpdateRefRequestOptions + ]; + "PATCH /repos/:owner/:repo/hooks/:hook_id": [ + ReposUpdateHookEndpoint, + ReposUpdateHookRequestOptions + ]; + "PATCH /repos/:owner/:repo/import": [ + MigrationsUpdateImportEndpoint, + MigrationsUpdateImportRequestOptions + ]; + "PATCH /repos/:owner/:repo/import/authors/:author_id": [ + MigrationsMapCommitAuthorEndpoint, + MigrationsMapCommitAuthorRequestOptions + ]; + "PATCH /repos/:owner/:repo/import/lfs": [ + MigrationsSetLfsPreferenceEndpoint, + MigrationsSetLfsPreferenceRequestOptions + ]; + "PATCH /repos/:owner/:repo/invitations/:invitation_id": [ + ReposUpdateInvitationEndpoint, + ReposUpdateInvitationRequestOptions + ]; + "PATCH /repos/:owner/:repo/issues/:issue_number": [ + IssuesUpdateEndpoint, + IssuesUpdateRequestOptions + ]; + "PATCH /repos/:owner/:repo/issues/comments/:comment_id": [ + IssuesUpdateCommentEndpoint, + IssuesUpdateCommentRequestOptions + ]; + "PATCH /repos/:owner/:repo/labels/:name": [ + IssuesUpdateLabelEndpoint, + IssuesUpdateLabelRequestOptions + ]; + "PATCH /repos/:owner/:repo/milestones/:milestone_number": [ + IssuesUpdateMilestoneEndpoint, + IssuesUpdateMilestoneRequestOptions + ]; + "PATCH /repos/:owner/:repo/pulls/:pull_number": [ + PullsUpdateEndpoint, + PullsUpdateRequestOptions + ]; + "PATCH /repos/:owner/:repo/pulls/comments/:comment_id": [ + PullsUpdateCommentEndpoint, + PullsUpdateCommentRequestOptions + ]; + "PATCH /repos/:owner/:repo/releases/:release_id": [ + ReposUpdateReleaseEndpoint, + ReposUpdateReleaseRequestOptions + ]; + "PATCH /repos/:owner/:repo/releases/assets/:asset_id": [ + ReposUpdateReleaseAssetEndpoint, + ReposUpdateReleaseAssetRequestOptions + ]; + "PATCH /scim/v2/organizations/:org/Users/:scim_user_id": [ + ScimUpdateUserAttributeEndpoint, + ScimUpdateUserAttributeRequestOptions + ]; + "PATCH /teams/:team_id": [ + TeamsUpdateLegacyEndpoint | TeamsUpdateEndpoint, + TeamsUpdateLegacyRequestOptions | TeamsUpdateRequestOptions + ]; + "PATCH /teams/:team_id/discussions/:discussion_number": [ + TeamsUpdateDiscussionLegacyEndpoint | TeamsUpdateDiscussionEndpoint, + + | TeamsUpdateDiscussionLegacyRequestOptions + | TeamsUpdateDiscussionRequestOptions + ]; + "PATCH /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [ + + | TeamsUpdateDiscussionCommentLegacyEndpoint + | TeamsUpdateDiscussionCommentEndpoint, + + | TeamsUpdateDiscussionCommentLegacyRequestOptions + | TeamsUpdateDiscussionCommentRequestOptions + ]; + "PATCH /teams/:team_id/team-sync/group-mappings": [ + + | TeamsCreateOrUpdateIdPGroupConnectionsLegacyEndpoint + | TeamsCreateOrUpdateIdPGroupConnectionsEndpoint, + + | TeamsCreateOrUpdateIdPGroupConnectionsLegacyRequestOptions + | TeamsCreateOrUpdateIdPGroupConnectionsRequestOptions + ]; + "PATCH /user": [ + UsersUpdateAuthenticatedEndpoint, + UsersUpdateAuthenticatedRequestOptions + ]; + "PATCH /user/email/visibility": [ + UsersTogglePrimaryEmailVisibilityEndpoint, + UsersTogglePrimaryEmailVisibilityRequestOptions + ]; + "PATCH /user/memberships/orgs/:org": [ + OrgsUpdateMembershipEndpoint, + OrgsUpdateMembershipRequestOptions + ]; + "PATCH /user/repository_invitations/:invitation_id": [ + ReposAcceptInvitationEndpoint, + ReposAcceptInvitationRequestOptions + ]; + "POST /app-manifests/:code/conversions": [ + AppsCreateFromManifestEndpoint, + AppsCreateFromManifestRequestOptions + ]; + "POST /app/installations/:installation_id/access_tokens": [ + AppsCreateInstallationTokenEndpoint, + AppsCreateInstallationTokenRequestOptions + ]; + "POST /applications/:client_id/token": [ + AppsCheckTokenEndpoint, + AppsCheckTokenRequestOptions + ]; + "POST /applications/:client_id/tokens/:access_token": [ + + | AppsResetAuthorizationEndpoint + | OauthAuthorizationsResetAuthorizationEndpoint, + + | AppsResetAuthorizationRequestOptions + | OauthAuthorizationsResetAuthorizationRequestOptions + ]; + "POST /authorizations": [ + OauthAuthorizationsCreateAuthorizationEndpoint, + OauthAuthorizationsCreateAuthorizationRequestOptions + ]; + "POST /content_references/:content_reference_id/attachments": [ + AppsCreateContentAttachmentEndpoint, + AppsCreateContentAttachmentRequestOptions + ]; + "POST /gists": [GistsCreateEndpoint, GistsCreateRequestOptions]; + "POST /gists/:gist_id/comments": [ + GistsCreateCommentEndpoint, + GistsCreateCommentRequestOptions + ]; + "POST /gists/:gist_id/forks": [GistsForkEndpoint, GistsForkRequestOptions]; + "POST /markdown": [MarkdownRenderEndpoint, MarkdownRenderRequestOptions]; + "POST /markdown/raw": [ + MarkdownRenderRawEndpoint, + MarkdownRenderRawRequestOptions + ]; + "POST /orgs/:org/hooks": [ + OrgsCreateHookEndpoint, + OrgsCreateHookRequestOptions + ]; + "POST /orgs/:org/hooks/:hook_id/pings": [ + OrgsPingHookEndpoint, + OrgsPingHookRequestOptions + ]; + "POST /orgs/:org/invitations": [ + OrgsCreateInvitationEndpoint, + OrgsCreateInvitationRequestOptions + ]; + "POST /orgs/:org/migrations": [ + MigrationsStartForOrgEndpoint, + MigrationsStartForOrgRequestOptions + ]; + "POST /orgs/:org/projects": [ + ProjectsCreateForOrgEndpoint, + ProjectsCreateForOrgRequestOptions + ]; + "POST /orgs/:org/repos": [ + ReposCreateInOrgEndpoint, + ReposCreateInOrgRequestOptions + ]; + "POST /orgs/:org/teams": [TeamsCreateEndpoint, TeamsCreateRequestOptions]; + "POST /orgs/:org/teams/:team_slug/discussions": [ + TeamsCreateDiscussionInOrgEndpoint, + TeamsCreateDiscussionInOrgRequestOptions + ]; + "POST /orgs/:org/teams/:team_slug/discussions/:discussion_number/comments": [ + TeamsCreateDiscussionCommentInOrgEndpoint, + TeamsCreateDiscussionCommentInOrgRequestOptions + ]; + "POST /orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions": [ + ReactionsCreateForTeamDiscussionCommentInOrgEndpoint, + ReactionsCreateForTeamDiscussionCommentInOrgRequestOptions + ]; + "POST /orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions": [ + ReactionsCreateForTeamDiscussionInOrgEndpoint, + ReactionsCreateForTeamDiscussionInOrgRequestOptions + ]; + "POST /projects/:project_id/columns": [ + ProjectsCreateColumnEndpoint, + ProjectsCreateColumnRequestOptions + ]; + "POST /projects/columns/:column_id/cards": [ + ProjectsCreateCardEndpoint, + ProjectsCreateCardRequestOptions + ]; + "POST /projects/columns/:column_id/moves": [ + ProjectsMoveColumnEndpoint, + ProjectsMoveColumnRequestOptions + ]; + "POST /projects/columns/cards/:card_id/moves": [ + ProjectsMoveCardEndpoint, + ProjectsMoveCardRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ + ReposAddProtectedBranchAdminEnforcementEndpoint, + ReposAddProtectedBranchAdminEnforcementRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ + ReposAddProtectedBranchRequiredSignaturesEndpoint, + ReposAddProtectedBranchRequiredSignaturesRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ + ReposAddProtectedBranchRequiredStatusChecksContextsEndpoint, + ReposAddProtectedBranchRequiredStatusChecksContextsRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/restrictions/apps": [ + ReposAddProtectedBranchAppRestrictionsEndpoint, + ReposAddProtectedBranchAppRestrictionsRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ + ReposAddProtectedBranchTeamRestrictionsEndpoint, + ReposAddProtectedBranchTeamRestrictionsRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ + ReposAddProtectedBranchUserRestrictionsEndpoint, + ReposAddProtectedBranchUserRestrictionsRequestOptions + ]; + "POST /repos/:owner/:repo/check-runs": [ + ChecksCreateEndpoint, + ChecksCreateRequestOptions + ]; + "POST /repos/:owner/:repo/check-suites": [ + ChecksCreateSuiteEndpoint, + ChecksCreateSuiteRequestOptions + ]; + "POST /repos/:owner/:repo/check-suites/:check_suite_id/rerequest": [ + ChecksRerequestSuiteEndpoint, + ChecksRerequestSuiteRequestOptions + ]; + "POST /repos/:owner/:repo/comments/:comment_id/reactions": [ + ReactionsCreateForCommitCommentEndpoint, + ReactionsCreateForCommitCommentRequestOptions + ]; + "POST /repos/:owner/:repo/commits/:commit_sha/comments": [ + ReposCreateCommitCommentEndpoint, + ReposCreateCommitCommentRequestOptions + ]; + "POST /repos/:owner/:repo/deployments": [ + ReposCreateDeploymentEndpoint, + ReposCreateDeploymentRequestOptions + ]; + "POST /repos/:owner/:repo/deployments/:deployment_id/statuses": [ + ReposCreateDeploymentStatusEndpoint, + ReposCreateDeploymentStatusRequestOptions + ]; + "POST /repos/:owner/:repo/dispatches": [ + ReposCreateDispatchEventEndpoint, + ReposCreateDispatchEventRequestOptions + ]; + "POST /repos/:owner/:repo/forks": [ + ReposCreateForkEndpoint, + ReposCreateForkRequestOptions + ]; + "POST /repos/:owner/:repo/git/blobs": [ + GitCreateBlobEndpoint, + GitCreateBlobRequestOptions + ]; + "POST /repos/:owner/:repo/git/commits": [ + GitCreateCommitEndpoint, + GitCreateCommitRequestOptions + ]; + "POST /repos/:owner/:repo/git/refs": [ + GitCreateRefEndpoint, + GitCreateRefRequestOptions + ]; + "POST /repos/:owner/:repo/git/tags": [ + GitCreateTagEndpoint, + GitCreateTagRequestOptions + ]; + "POST /repos/:owner/:repo/git/trees": [ + GitCreateTreeEndpoint, + GitCreateTreeRequestOptions + ]; + "POST /repos/:owner/:repo/hooks": [ + ReposCreateHookEndpoint, + ReposCreateHookRequestOptions + ]; + "POST /repos/:owner/:repo/hooks/:hook_id/pings": [ + ReposPingHookEndpoint, + ReposPingHookRequestOptions + ]; + "POST /repos/:owner/:repo/hooks/:hook_id/tests": [ + ReposTestPushHookEndpoint, + ReposTestPushHookRequestOptions + ]; + "POST /repos/:owner/:repo/issues": [ + IssuesCreateEndpoint, + IssuesCreateRequestOptions + ]; + "POST /repos/:owner/:repo/issues/:issue_number/assignees": [ + IssuesAddAssigneesEndpoint, + IssuesAddAssigneesRequestOptions + ]; + "POST /repos/:owner/:repo/issues/:issue_number/comments": [ + IssuesCreateCommentEndpoint, + IssuesCreateCommentRequestOptions + ]; + "POST /repos/:owner/:repo/issues/:issue_number/labels": [ + IssuesAddLabelsEndpoint, + IssuesAddLabelsRequestOptions + ]; + "POST /repos/:owner/:repo/issues/:issue_number/reactions": [ + ReactionsCreateForIssueEndpoint, + ReactionsCreateForIssueRequestOptions + ]; + "POST /repos/:owner/:repo/issues/comments/:comment_id/reactions": [ + ReactionsCreateForIssueCommentEndpoint, + ReactionsCreateForIssueCommentRequestOptions + ]; + "POST /repos/:owner/:repo/keys": [ + ReposAddDeployKeyEndpoint, + ReposAddDeployKeyRequestOptions + ]; + "POST /repos/:owner/:repo/labels": [ + IssuesCreateLabelEndpoint, + IssuesCreateLabelRequestOptions + ]; + "POST /repos/:owner/:repo/merges": [ + ReposMergeEndpoint, + ReposMergeRequestOptions + ]; + "POST /repos/:owner/:repo/milestones": [ + IssuesCreateMilestoneEndpoint, + IssuesCreateMilestoneRequestOptions + ]; + "POST /repos/:owner/:repo/pages": [ + ReposEnablePagesSiteEndpoint, + ReposEnablePagesSiteRequestOptions + ]; + "POST /repos/:owner/:repo/pages/builds": [ + ReposRequestPageBuildEndpoint, + ReposRequestPageBuildRequestOptions + ]; + "POST /repos/:owner/:repo/projects": [ + ProjectsCreateForRepoEndpoint, + ProjectsCreateForRepoRequestOptions + ]; + "POST /repos/:owner/:repo/pulls": [ + PullsCreateEndpoint, + PullsCreateRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/:pull_number/comments": [ + PullsCreateCommentEndpoint | PullsCreateCommentReplyEndpoint, + PullsCreateCommentRequestOptions | PullsCreateCommentReplyRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/:pull_number/comments/:comment_id/replies": [ + PullsCreateReviewCommentReplyEndpoint, + PullsCreateReviewCommentReplyRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [ + PullsCreateReviewRequestEndpoint, + PullsCreateReviewRequestRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/:pull_number/reviews": [ + PullsCreateReviewEndpoint, + PullsCreateReviewRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events": [ + PullsSubmitReviewEndpoint, + PullsSubmitReviewRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/comments/:comment_id/reactions": [ + ReactionsCreateForPullRequestReviewCommentEndpoint, + ReactionsCreateForPullRequestReviewCommentRequestOptions + ]; + "POST /repos/:owner/:repo/releases": [ + ReposCreateReleaseEndpoint, + ReposCreateReleaseRequestOptions + ]; + "POST /repos/:owner/:repo/statuses/:sha": [ + ReposCreateStatusEndpoint, + ReposCreateStatusRequestOptions + ]; + "POST /repos/:owner/:repo/transfer": [ + ReposTransferEndpoint, + ReposTransferRequestOptions + ]; + "POST /repos/:template_owner/:template_repo/generate": [ + ReposCreateUsingTemplateEndpoint, + ReposCreateUsingTemplateRequestOptions + ]; + "POST /scim/v2/organizations/:org/Users": [ + ScimProvisionAndInviteUsersEndpoint | ScimProvisionInviteUsersEndpoint, + + | ScimProvisionAndInviteUsersRequestOptions + | ScimProvisionInviteUsersRequestOptions + ]; + "POST /teams/:team_id/discussions": [ + TeamsCreateDiscussionLegacyEndpoint | TeamsCreateDiscussionEndpoint, + + | TeamsCreateDiscussionLegacyRequestOptions + | TeamsCreateDiscussionRequestOptions + ]; + "POST /teams/:team_id/discussions/:discussion_number/comments": [ + + | TeamsCreateDiscussionCommentLegacyEndpoint + | TeamsCreateDiscussionCommentEndpoint, + + | TeamsCreateDiscussionCommentLegacyRequestOptions + | TeamsCreateDiscussionCommentRequestOptions + ]; + "POST /teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions": [ + + | ReactionsCreateForTeamDiscussionCommentLegacyEndpoint + | ReactionsCreateForTeamDiscussionCommentEndpoint, + + | ReactionsCreateForTeamDiscussionCommentLegacyRequestOptions + | ReactionsCreateForTeamDiscussionCommentRequestOptions + ]; + "POST /teams/:team_id/discussions/:discussion_number/reactions": [ + + | ReactionsCreateForTeamDiscussionLegacyEndpoint + | ReactionsCreateForTeamDiscussionEndpoint, + + | ReactionsCreateForTeamDiscussionLegacyRequestOptions + | ReactionsCreateForTeamDiscussionRequestOptions + ]; + "POST /user/emails": [UsersAddEmailsEndpoint, UsersAddEmailsRequestOptions]; + "POST /user/gpg_keys": [ + UsersCreateGpgKeyEndpoint, + UsersCreateGpgKeyRequestOptions + ]; + "POST /user/keys": [ + UsersCreatePublicKeyEndpoint, + UsersCreatePublicKeyRequestOptions + ]; + "POST /user/migrations": [ + MigrationsStartForAuthenticatedUserEndpoint, + MigrationsStartForAuthenticatedUserRequestOptions + ]; + "POST /user/projects": [ + ProjectsCreateForAuthenticatedUserEndpoint, + ProjectsCreateForAuthenticatedUserRequestOptions + ]; + "POST /user/repos": [ + ReposCreateForAuthenticatedUserEndpoint, + ReposCreateForAuthenticatedUserRequestOptions + ]; + "PUT /authorizations/clients/:client_id": [ + OauthAuthorizationsGetOrCreateAuthorizationForAppEndpoint, + OauthAuthorizationsGetOrCreateAuthorizationForAppRequestOptions + ]; + "PUT /authorizations/clients/:client_id/:fingerprint": [ + + | OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintEndpoint + | OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintEndpoint, + + | OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRequestOptions + | OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintRequestOptions + ]; + "PUT /gists/:gist_id/star": [GistsStarEndpoint, GistsStarRequestOptions]; + "PUT /notifications": [ + ActivityMarkAsReadEndpoint, + ActivityMarkAsReadRequestOptions + ]; + "PUT /notifications/threads/:thread_id/subscription": [ + ActivitySetThreadSubscriptionEndpoint, + ActivitySetThreadSubscriptionRequestOptions + ]; + "PUT /orgs/:org/blocks/:username": [ + OrgsBlockUserEndpoint, + OrgsBlockUserRequestOptions + ]; + "PUT /orgs/:org/interaction-limits": [ + InteractionsAddOrUpdateRestrictionsForOrgEndpoint, + InteractionsAddOrUpdateRestrictionsForOrgRequestOptions + ]; + "PUT /orgs/:org/memberships/:username": [ + OrgsAddOrUpdateMembershipEndpoint, + OrgsAddOrUpdateMembershipRequestOptions + ]; + "PUT /orgs/:org/outside_collaborators/:username": [ + OrgsConvertMemberToOutsideCollaboratorEndpoint, + OrgsConvertMemberToOutsideCollaboratorRequestOptions + ]; + "PUT /orgs/:org/public_members/:username": [ + OrgsPublicizeMembershipEndpoint, + OrgsPublicizeMembershipRequestOptions + ]; + "PUT /orgs/:org/teams/:team_slug/memberships/:username": [ + TeamsAddOrUpdateMembershipInOrgEndpoint, + TeamsAddOrUpdateMembershipInOrgRequestOptions + ]; + "PUT /orgs/:org/teams/:team_slug/projects/:project_id": [ + TeamsAddOrUpdateProjectInOrgEndpoint, + TeamsAddOrUpdateProjectInOrgRequestOptions + ]; + "PUT /orgs/:org/teams/:team_slug/repos/:owner/:repo": [ + TeamsAddOrUpdateRepoInOrgEndpoint, + TeamsAddOrUpdateRepoInOrgRequestOptions + ]; + "PUT /projects/:project_id/collaborators/:username": [ + ProjectsAddCollaboratorEndpoint, + ProjectsAddCollaboratorRequestOptions + ]; + "PUT /repos/:owner/:repo/automated-security-fixes": [ + ReposEnableAutomatedSecurityFixesEndpoint, + ReposEnableAutomatedSecurityFixesRequestOptions + ]; + "PUT /repos/:owner/:repo/branches/:branch/protection": [ + ReposUpdateBranchProtectionEndpoint, + ReposUpdateBranchProtectionRequestOptions + ]; + "PUT /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ + ReposReplaceProtectedBranchRequiredStatusChecksContextsEndpoint, + ReposReplaceProtectedBranchRequiredStatusChecksContextsRequestOptions + ]; + "PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/apps": [ + ReposReplaceProtectedBranchAppRestrictionsEndpoint, + ReposReplaceProtectedBranchAppRestrictionsRequestOptions + ]; + "PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ + ReposReplaceProtectedBranchTeamRestrictionsEndpoint, + ReposReplaceProtectedBranchTeamRestrictionsRequestOptions + ]; + "PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ + ReposReplaceProtectedBranchUserRestrictionsEndpoint, + ReposReplaceProtectedBranchUserRestrictionsRequestOptions + ]; + "PUT /repos/:owner/:repo/collaborators/:username": [ + ReposAddCollaboratorEndpoint, + ReposAddCollaboratorRequestOptions + ]; + "PUT /repos/:owner/:repo/contents/:path": [ + + | ReposCreateOrUpdateFileEndpoint + | ReposCreateFileEndpoint + | ReposUpdateFileEndpoint, + + | ReposCreateOrUpdateFileRequestOptions + | ReposCreateFileRequestOptions + | ReposUpdateFileRequestOptions + ]; + "PUT /repos/:owner/:repo/import": [ + MigrationsStartImportEndpoint, + MigrationsStartImportRequestOptions + ]; + "PUT /repos/:owner/:repo/interaction-limits": [ + InteractionsAddOrUpdateRestrictionsForRepoEndpoint, + InteractionsAddOrUpdateRestrictionsForRepoRequestOptions + ]; + "PUT /repos/:owner/:repo/issues/:issue_number/labels": [ + IssuesReplaceLabelsEndpoint, + IssuesReplaceLabelsRequestOptions + ]; + "PUT /repos/:owner/:repo/issues/:issue_number/lock": [ + IssuesLockEndpoint, + IssuesLockRequestOptions + ]; + "PUT /repos/:owner/:repo/notifications": [ + ActivityMarkNotificationsAsReadForRepoEndpoint, + ActivityMarkNotificationsAsReadForRepoRequestOptions + ]; + "PUT /repos/:owner/:repo/pages": [ + ReposUpdateInformationAboutPagesSiteEndpoint, + ReposUpdateInformationAboutPagesSiteRequestOptions + ]; + "PUT /repos/:owner/:repo/pulls/:pull_number/merge": [ + PullsMergeEndpoint, + PullsMergeRequestOptions + ]; + "PUT /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [ + PullsUpdateReviewEndpoint, + PullsUpdateReviewRequestOptions + ]; + "PUT /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals": [ + PullsDismissReviewEndpoint, + PullsDismissReviewRequestOptions + ]; + "PUT /repos/:owner/:repo/pulls/:pull_number/update-branch": [ + PullsUpdateBranchEndpoint, + PullsUpdateBranchRequestOptions + ]; + "PUT /repos/:owner/:repo/subscription": [ + ActivitySetRepoSubscriptionEndpoint, + ActivitySetRepoSubscriptionRequestOptions + ]; + "PUT /repos/:owner/:repo/topics": [ + ReposReplaceTopicsEndpoint, + ReposReplaceTopicsRequestOptions + ]; + "PUT /repos/:owner/:repo/vulnerability-alerts": [ + ReposEnableVulnerabilityAlertsEndpoint, + ReposEnableVulnerabilityAlertsRequestOptions + ]; + "PUT /scim/v2/organizations/:org/Users/:scim_user_id": [ + + | ScimReplaceProvisionedUserInformationEndpoint + | ScimUpdateProvisionedOrgMembershipEndpoint, + + | ScimReplaceProvisionedUserInformationRequestOptions + | ScimUpdateProvisionedOrgMembershipRequestOptions + ]; + "PUT /teams/:team_id/members/:username": [ + TeamsAddMemberLegacyEndpoint | TeamsAddMemberEndpoint, + TeamsAddMemberLegacyRequestOptions | TeamsAddMemberRequestOptions + ]; + "PUT /teams/:team_id/memberships/:username": [ + + | TeamsAddOrUpdateMembershipLegacyEndpoint + | TeamsAddOrUpdateMembershipEndpoint, + + | TeamsAddOrUpdateMembershipLegacyRequestOptions + | TeamsAddOrUpdateMembershipRequestOptions + ]; + "PUT /teams/:team_id/projects/:project_id": [ + TeamsAddOrUpdateProjectLegacyEndpoint | TeamsAddOrUpdateProjectEndpoint, + + | TeamsAddOrUpdateProjectLegacyRequestOptions + | TeamsAddOrUpdateProjectRequestOptions + ]; + "PUT /teams/:team_id/repos/:owner/:repo": [ + TeamsAddOrUpdateRepoLegacyEndpoint | TeamsAddOrUpdateRepoEndpoint, + + | TeamsAddOrUpdateRepoLegacyRequestOptions + | TeamsAddOrUpdateRepoRequestOptions + ]; + "PUT /user/blocks/:username": [UsersBlockEndpoint, UsersBlockRequestOptions]; + "PUT /user/following/:username": [ + UsersFollowEndpoint, + UsersFollowRequestOptions + ]; + "PUT /user/installations/:installation_id/repositories/:repository_id": [ + AppsAddRepoToInstallationEndpoint, + AppsAddRepoToInstallationRequestOptions + ]; + "PUT /user/starred/:owner/:repo": [ + ActivityStarRepoEndpoint, + ActivityStarRepoRequestOptions + ]; + "PUT /user/subscriptions/:owner/:repo": [ + ActivityWatchRepoLegacyEndpoint, + ActivityWatchRepoLegacyRequestOptions + ]; +} + +type AppsGetAuthenticatedEndpoint = {}; +type AppsGetAuthenticatedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCreateFromManifestEndpoint = { + /** + * code parameter + */ + code: string; +}; +type AppsCreateFromManifestRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListInstallationsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListInstallationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsGetInstallationEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; +}; +type AppsGetInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsDeleteInstallationEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; +}; +type AppsDeleteInstallationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCreateInstallationTokenEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; + /** + * The `id`s of the repositories that the installation token can access. Providing repository `id`s restricts the access of an installation token to specific repositories. You can use the "[List repositories](https://developer.github.com/v3/apps/installations/#list-repositories)" endpoint to get the `id` of all repositories that an installation can access. For example, you can select specific repositories when creating an installation token to restrict the number of repositories that can be cloned using the token. + */ + repository_ids?: number[]; + /** + * The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see "[GitHub App permissions](https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url-parameters/#github-app-permissions)." + */ + permissions?: AppsCreateInstallationTokenParamsPermissions; +}; +type AppsCreateInstallationTokenRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsListGrantsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OauthAuthorizationsListGrantsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsGetGrantEndpoint = { + /** + * grant_id parameter + */ + grant_id: number; +}; +type OauthAuthorizationsGetGrantRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsDeleteGrantEndpoint = { + /** + * grant_id parameter + */ + grant_id: number; +}; +type OauthAuthorizationsDeleteGrantRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsDeleteAuthorizationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; +}; +type AppsDeleteAuthorizationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsRevokeGrantForApplicationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type AppsRevokeGrantForApplicationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsRevokeGrantForApplicationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type OauthAuthorizationsRevokeGrantForApplicationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCheckTokenEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; +}; +type AppsCheckTokenRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsResetTokenEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; +}; +type AppsResetTokenRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsDeleteTokenEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; +}; +type AppsDeleteTokenRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCheckAuthorizationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type AppsCheckAuthorizationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsCheckAuthorizationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type OauthAuthorizationsCheckAuthorizationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsResetAuthorizationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type AppsResetAuthorizationRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsResetAuthorizationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type OauthAuthorizationsResetAuthorizationRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsRevokeAuthorizationForApplicationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type AppsRevokeAuthorizationForApplicationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsRevokeAuthorizationForApplicationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type OauthAuthorizationsRevokeAuthorizationForApplicationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsGetBySlugEndpoint = { + /** + * app_slug parameter + */ + app_slug: string; +}; +type AppsGetBySlugRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsListAuthorizationsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OauthAuthorizationsListAuthorizationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsCreateAuthorizationEndpoint = { + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * The 20 character OAuth app client key for which to create the token. + */ + client_id?: string; + /** + * The 40 character OAuth app client secret for which to create the token. + */ + client_secret?: string; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; +}; +type OauthAuthorizationsCreateAuthorizationRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to [Get-or-create an authorization for a specific app and fingerprint](https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint). + */ + fingerprint?: string; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * fingerprint parameter + */ + fingerprint: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * fingerprint parameter + */ + fingerprint: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsGetAuthorizationEndpoint = { + /** + * authorization_id parameter + */ + authorization_id: number; +}; +type OauthAuthorizationsGetAuthorizationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsUpdateAuthorizationEndpoint = { + /** + * authorization_id parameter + */ + authorization_id: number; + /** + * Replaces the authorization scopes with these. + */ + scopes?: string[]; + /** + * A list of scopes to add to this authorization. + */ + add_scopes?: string[]; + /** + * A list of scopes to remove from this authorization. + */ + remove_scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; +}; +type OauthAuthorizationsUpdateAuthorizationRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsDeleteAuthorizationEndpoint = { + /** + * authorization_id parameter + */ + authorization_id: number; +}; +type OauthAuthorizationsDeleteAuthorizationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type CodesOfConductListConductCodesEndpoint = {}; +type CodesOfConductListConductCodesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type CodesOfConductGetConductCodeEndpoint = { + /** + * key parameter + */ + key: string; +}; +type CodesOfConductGetConductCodeRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCreateContentAttachmentEndpoint = { + /** + * content_reference_id parameter + */ + content_reference_id: number; + /** + * The title of the content attachment displayed in the body or comment of an issue or pull request. + */ + title: string; + /** + * The body text of the content attachment displayed in the body or comment of an issue or pull request. This parameter supports markdown. + */ + body: string; +}; +type AppsCreateContentAttachmentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type EmojisGetEndpoint = {}; +type EmojisGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListPublicEventsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListPublicEventsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListFeedsEndpoint = {}; +type ActivityListFeedsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListEndpoint = { + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsCreateEndpoint = { + /** + * The filenames and content of each file in the gist. The keys in the `files` object represent the filename and have the type `string`. + */ + files: GistsCreateParamsFiles; + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * When `true`, the gist will be public and available for anyone to see. + */ + public?: boolean; +}; +type GistsCreateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListPublicEndpoint = { + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListPublicRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListStarredEndpoint = { + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListStarredRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsGetEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsUpdateEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * The filenames and content that make up this gist. + */ + files?: GistsUpdateParamsFiles; +}; +type GistsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsDeleteEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListCommentsEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsCreateCommentEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * The comment text. + */ + body: string; +}; +type GistsCreateCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsGetCommentEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type GistsGetCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsUpdateCommentEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The comment text. + */ + body: string; +}; +type GistsUpdateCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsDeleteCommentEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type GistsDeleteCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListCommitsEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsForkEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsForkRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListForksEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListForksRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsStarEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsStarRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsUnstarEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsUnstarRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsCheckIsStarredEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsCheckIsStarredRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsGetRevisionEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * sha parameter + */ + sha: string; +}; +type GistsGetRevisionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitignoreListTemplatesEndpoint = {}; +type GitignoreListTemplatesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitignoreGetTemplateEndpoint = { + /** + * name parameter + */ + name: string; +}; +type GitignoreGetTemplateRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListReposEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListReposRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsRevokeInstallationTokenEndpoint = {}; +type AppsRevokeInstallationTokenRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListEndpoint = { + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "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?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchIssuesLegacyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repository parameter + */ + repository: string; + /** + * Indicates the state of the issues to return. Can be either `open` or `closed`. + */ + state: "open" | "closed"; + /** + * The search term. + */ + keyword: string; +}; +type SearchIssuesLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchReposLegacyEndpoint = { + /** + * The search term. + */ + keyword: string; + /** + * Filter results by language. + */ + language?: string; + /** + * The page number to fetch. + */ + start_page?: string; + /** + * The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match. + */ + sort?: "stars" | "forks" | "updated"; + /** + * The sort field. if `sort` param is provided. Can be either `asc` or `desc`. + */ + order?: "asc" | "desc"; +}; +type SearchReposLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchEmailLegacyEndpoint = { + /** + * The email address. + */ + email: string; +}; +type SearchEmailLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchUsersLegacyEndpoint = { + /** + * The search term. + */ + keyword: string; + /** + * The page number to fetch. + */ + start_page?: string; + /** + * The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match. + */ + sort?: "stars" | "forks" | "updated"; + /** + * The sort field. if `sort` param is provided. Can be either `asc` or `desc`. + */ + order?: "asc" | "desc"; +}; +type SearchUsersLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type LicensesListCommonlyUsedEndpoint = {}; +type LicensesListCommonlyUsedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type LicensesListEndpoint = {}; +type LicensesListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type LicensesGetEndpoint = { + /** + * license parameter + */ + license: string; +}; +type LicensesGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MarkdownRenderEndpoint = { + /** + * The Markdown text to render in HTML. Markdown content must be 400 KB or less. + */ + text: string; + /** + * The rendering mode. Can be either: + * \* `markdown` to render a document in plain Markdown, just like README.md files are rendered. + * \* `gfm` to render a document in [GitHub Flavored Markdown](https://github.github.com/gfm/), which creates links for user mentions as well as references to SHA-1 hashes, issues, and pull requests. + */ + mode?: "markdown" | "gfm"; + /** + * The repository context to use when creating references in `gfm` mode. Omit this parameter when using `markdown` mode. + */ + context?: string; +}; +type MarkdownRenderRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MarkdownRenderRawEndpoint = { + /** + * data parameter + */ + data: string; +}; +type MarkdownRenderRawRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCheckAccountIsAssociatedWithAnyEndpoint = { + /** + * account_id parameter + */ + account_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsCheckAccountIsAssociatedWithAnyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListPlansEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListPlansRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListAccountsUserOrOrgOnPlanEndpoint = { + /** + * plan_id parameter + */ + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListAccountsUserOrOrgOnPlanRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCheckAccountIsAssociatedWithAnyStubbedEndpoint = { + /** + * account_id parameter + */ + account_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsCheckAccountIsAssociatedWithAnyStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListPlansStubbedEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListPlansStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListAccountsUserOrOrgOnPlanStubbedEndpoint = { + /** + * plan_id parameter + */ + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListAccountsUserOrOrgOnPlanStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MetaGetEndpoint = {}; +type MetaGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListPublicEventsForRepoNetworkEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListPublicEventsForRepoNetworkRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListNotificationsEndpoint = { + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * 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; + /** + * 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; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListNotificationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityMarkAsReadEndpoint = { + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. 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; +}; +type ActivityMarkAsReadRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityGetThreadEndpoint = { + /** + * thread_id parameter + */ + thread_id: number; +}; +type ActivityGetThreadRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityMarkThreadAsReadEndpoint = { + /** + * thread_id parameter + */ + thread_id: number; +}; +type ActivityMarkThreadAsReadRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityGetThreadSubscriptionEndpoint = { + /** + * thread_id parameter + */ + thread_id: number; +}; +type ActivityGetThreadSubscriptionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivitySetThreadSubscriptionEndpoint = { + /** + * thread_id parameter + */ + thread_id: number; + /** + * Unsubscribes and subscribes you to a conversation. Set `ignored` to `true` to block all notifications from this thread. + */ + ignored?: boolean; +}; +type ActivitySetThreadSubscriptionRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityDeleteThreadSubscriptionEndpoint = { + /** + * thread_id parameter + */ + thread_id: number; +}; +type ActivityDeleteThreadSubscriptionRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListEndpoint = { + /** + * The integer ID of the last Organization that you've seen. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsGetEndpoint = { + /** + * org parameter + */ + org: string; +}; +type OrgsGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsUpdateEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Billing email address. This address is not publicized. + */ + billing_email?: string; + /** + * The company name. + */ + company?: string; + /** + * The publicly visible email address. + */ + email?: string; + /** + * The location. + */ + location?: string; + /** + * The shorthand name of the company. + */ + name?: string; + /** + * The description of the company. + */ + description?: string; + /** + * Toggles whether an organization can use organization projects. + */ + has_organization_projects?: boolean; + /** + * Toggles whether repositories that belong to the organization can use repository projects. + */ + has_repository_projects?: boolean; + /** + * Default permission level members have for organization repositories: + * \* `read` - can pull, but not push to or administer this repository. + * \* `write` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push, and administer this repository. + * \* `none` - no permissions granted by default. + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * Toggles the ability of non-admin organization members to create repositories. Can be one of: + * \* `true` - all organization members can create repositories. + * \* `false` - only organization owners can create repositories. + * Default: `true` + * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + */ + members_can_create_repositories?: boolean; + /** + * Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud. Can be one of: + * \* `true` - all organization members can create internal repositories. + * \* `false` - only organization owners can create internal repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.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; + /** + * Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: + * \* `true` - all organization members can create private repositories. + * \* `false` - only organization owners can create private repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.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; + /** + * Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: + * \* `true` - all organization members can create public repositories. + * \* `false` - only organization owners can create public repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.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; + /** + * Specifies which types of repositories non-admin organization members can create. Can be one of: + * \* `all` - all organization members can create public and private repositories. + * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * \* `none` - only admin members can create repositories. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; +}; +type OrgsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListBlockedUsersEndpoint = { + /** + * org parameter + */ + org: string; +}; +type OrgsListBlockedUsersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsCheckBlockedUserEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsCheckBlockedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsBlockUserEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsBlockUserRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsUnblockUserEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsUnblockUserRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListCredentialAuthorizationsEndpoint = { + /** + * org parameter + */ + org: string; +}; +type OrgsListCredentialAuthorizationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsRemoveCredentialAuthorizationEndpoint = { + /** + * org parameter + */ + org: string; + /** + * credential_id parameter + */ + credential_id: number; +}; +type OrgsRemoveCredentialAuthorizationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListPublicEventsForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListPublicEventsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListHooksEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListHooksRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsCreateHookEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Must be passed as "web". + */ + name: string; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#create-hook-config-params). + */ + config: OrgsCreateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; +}; +type OrgsCreateHookRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsGetHookEndpoint = { + /** + * org parameter + */ + org: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type OrgsGetHookRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsUpdateHookEndpoint = { + /** + * org parameter + */ + org: string; + /** + * hook_id parameter + */ + hook_id: number; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#update-hook-config-params). + */ + config?: OrgsUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; +}; +type OrgsUpdateHookRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsDeleteHookEndpoint = { + /** + * org parameter + */ + org: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type OrgsDeleteHookRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsPingHookEndpoint = { + /** + * org parameter + */ + org: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type OrgsPingHookRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsGetOrgInstallationEndpoint = { + /** + * org parameter + */ + org: string; +}; +type AppsGetOrgInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsFindOrgInstallationEndpoint = { + /** + * org parameter + */ + org: string; +}; +type AppsFindOrgInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListInstallationsEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListInstallationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsGetRestrictionsForOrgEndpoint = { + /** + * org parameter + */ + org: string; +}; +type InteractionsGetRestrictionsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsAddOrUpdateRestrictionsForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + */ + limit: "existing_users" | "contributors_only" | "collaborators_only"; +}; +type InteractionsAddOrUpdateRestrictionsForOrgRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsRemoveRestrictionsForOrgEndpoint = { + /** + * org parameter + */ + org: string; +}; +type InteractionsRemoveRestrictionsForOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListPendingInvitationsEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListPendingInvitationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsCreateInvitationEndpoint = { + /** + * org parameter + */ + org: string; + /** + * **Required unless you provide `email`**. GitHub user ID for the person you are inviting. + */ + invitee_id?: number; + /** + * **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. + */ + email?: string; + /** + * Specify role for new member. Can be one of: + * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. + * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. + * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** + * Specify IDs for the teams you want to invite new members to. + */ + team_ids?: number[]; +}; +type OrgsCreateInvitationRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListInvitationTeamsEndpoint = { + /** + * org parameter + */ + org: string; + /** + * invitation_id parameter + */ + invitation_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListInvitationTeamsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "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?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListMembersEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Filter members returned in the list. Can be one of: + * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. + * \* `all` - All members the authenticated user can see. + */ + filter?: "2fa_disabled" | "all"; + /** + * Filter members returned by their role. Can be one of: + * \* `all` - All members of the organization, regardless of role. + * \* `admin` - Organization owners. + * \* `member` - Non-owner organization members. + */ + role?: "all" | "admin" | "member"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListMembersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsCheckMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsCheckMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsRemoveMemberEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsRemoveMemberRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsGetMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsGetMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsAddOrUpdateMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; + /** + * 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. + */ + role?: "admin" | "member"; +}; +type OrgsAddOrUpdateMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsRemoveMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsRemoveMembershipRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsStartForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * A list of arrays indicating which repositories should be migrated. + */ + repositories: string[]; + /** + * Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + */ + lock_repositories?: boolean; + /** + * Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + */ + exclude_attachments?: boolean; +}; +type MigrationsStartForOrgRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsListForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type MigrationsListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetStatusForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsGetStatusForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetArchiveForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsGetArchiveForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsDeleteArchiveForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsDeleteArchiveForOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsUnlockRepoForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * migration_id parameter + */ + migration_id: number; + /** + * repo_name parameter + */ + repo_name: string; +}; +type MigrationsUnlockRepoForOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsListReposForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * migration_id parameter + */ + migration_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type MigrationsListReposForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListOutsideCollaboratorsEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Filter the list of outside collaborators. Can be one of: + * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. + * \* `all`: All outside collaborators. + */ + filter?: "2fa_disabled" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListOutsideCollaboratorsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsRemoveOutsideCollaboratorEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsRemoveOutsideCollaboratorRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsConvertMemberToOutsideCollaboratorEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsConvertMemberToOutsideCollaboratorRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsCreateForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * The name of the project. + */ + name: string; + /** + * The description of the project. + */ + body?: string; +}; +type ProjectsCreateForOrgRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListPublicMembersEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListPublicMembersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsCheckPublicMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsCheckPublicMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsPublicizeMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsPublicizeMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsConcealMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsConcealMembershipRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `type` can also be `internal`. + */ + type?: + | "all" + | "public" + | "private" + | "forks" + | "sources" + | "member" + | "internal"; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * The name of the repository. + */ + name: string; + /** + * A short description of the repository. + */ + description?: string; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + */ + private?: boolean; + /** + * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `visibility` can also be `internal`. For more information, see "[Creating an internal repository](https://help.github.com/github/creating-cloning-and-archiving-repositories/creating-an-internal-repository)" in the GitHub Help documentation. + * The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header. + */ + visibility?: "public" | "private" | "visibility" | "internal"; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * 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. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * 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; + /** + * Pass `true` to create an initial commit with empty README. + */ + auto_init?: boolean; + /** + * 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; + /** + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.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; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + */ + delete_branch_on_merge?: boolean; +}; +type ReposCreateInOrgRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListIdPGroupsForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListIdPGroupsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateEndpoint = { + /** + * org parameter + */ + org: string; + /** + * The name of the team. + */ + name: string; + /** + * The description of the team. + */ + description?: string; + /** + * List GitHub IDs for organization members who will become team maintainers. + */ + maintainers?: string[]; + /** + * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. + */ + repo_names?: string[]; + /** + * 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` + */ + privacy?: "secret" | "closed"; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + */ + permission?: "pull" | "push" | "admin"; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; +}; +type TeamsCreateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetByNameEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; +}; +type TeamsGetByNameRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * The name of the team. + */ + name: string; + /** + * The description of the team. + */ + description?: string; + /** + * 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. + */ + privacy?: "secret" | "closed"; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + */ + permission?: "pull" | "push" | "admin"; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; +}; +type TeamsUpdateInOrgRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; +}; +type TeamsDeleteInOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListDiscussionsInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListDiscussionsInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateDiscussionInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * The discussion post's title. + */ + title: string; + /** + * The discussion post's body text. + */ + body: string; + /** + * 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. + */ + private?: boolean; +}; +type TeamsCreateDiscussionInOrgRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetDiscussionInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; +}; +type TeamsGetDiscussionInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateDiscussionInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The discussion post's title. + */ + title?: string; + /** + * The discussion post's body text. + */ + body?: string; +}; +type TeamsUpdateDiscussionInOrgRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteDiscussionInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; +}; +type TeamsDeleteDiscussionInOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListDiscussionCommentsInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListDiscussionCommentsInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateDiscussionCommentInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The discussion comment's body text. + */ + body: string; +}; +type TeamsCreateDiscussionCommentInOrgRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetDiscussionCommentInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; +}; +type TeamsGetDiscussionCommentInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateDiscussionCommentInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * The discussion comment's body text. + */ + body: string; +}; +type TeamsUpdateDiscussionCommentInOrgRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteDiscussionCommentInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; +}; +type TeamsDeleteDiscussionCommentInOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForTeamDiscussionCommentInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForTeamDiscussionCommentInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForTeamDiscussionCommentInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForTeamDiscussionCommentInOrgRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForTeamDiscussionInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForTeamDiscussionInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForTeamDiscussionInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForTeamDiscussionInOrgRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListPendingInvitationsInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListPendingInvitationsInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListMembersInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: "member" | "maintainer" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListMembersInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetMembershipInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * username parameter + */ + username: string; +}; +type TeamsGetMembershipInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateMembershipInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * username parameter + */ + username: string; + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; +}; +type TeamsAddOrUpdateMembershipInOrgRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveMembershipInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * username parameter + */ + username: string; +}; +type TeamsRemoveMembershipInOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListProjectsInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListProjectsInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsReviewProjectInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * project_id parameter + */ + project_id: number; +}; +type TeamsReviewProjectInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateProjectInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * project_id parameter + */ + project_id: number; + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + permission?: "read" | "write" | "admin"; +}; +type TeamsAddOrUpdateProjectInOrgRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveProjectInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * project_id parameter + */ + project_id: number; +}; +type TeamsRemoveProjectInOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListReposInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListReposInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCheckManagesRepoInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type TeamsCheckManagesRepoInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateRepoInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + */ + permission?: "pull" | "push" | "admin"; +}; +type TeamsAddOrUpdateRepoInOrgRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveRepoInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type TeamsRemoveRepoInOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListIdPGroupsInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; +}; +type TeamsListIdPGroupsInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateOrUpdateIdPGroupConnectionsInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * 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: TeamsCreateOrUpdateIdPGroupConnectionsInOrgParamsGroups[]; +}; +type TeamsCreateOrUpdateIdPGroupConnectionsInOrgRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListChildInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListChildInOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsGetCardEndpoint = { + /** + * card_id parameter + */ + card_id: number; +}; +type ProjectsGetCardRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsUpdateCardEndpoint = { + /** + * card_id parameter + */ + card_id: number; + /** + * The card's note content. Only valid for cards without another type of content, so this cannot be specified if the card already has a `content_id` and `content_type`. + */ + note?: string; + /** + * Use `true` to archive a project card. Specify `false` if you need to restore a previously archived project card. + */ + archived?: boolean; +}; +type ProjectsUpdateCardRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsDeleteCardEndpoint = { + /** + * card_id parameter + */ + card_id: number; +}; +type ProjectsDeleteCardRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsMoveCardEndpoint = { + /** + * card_id parameter + */ + card_id: number; + /** + * Can be one of `top`, `bottom`, or `after:`, where `` is the `id` value of a card in the same column, or in the new column specified by `column_id`. + */ + position: string; + /** + * The `id` value of a column in the same project. + */ + column_id?: number; +}; +type ProjectsMoveCardRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsGetColumnEndpoint = { + /** + * column_id parameter + */ + column_id: number; +}; +type ProjectsGetColumnRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsUpdateColumnEndpoint = { + /** + * column_id parameter + */ + column_id: number; + /** + * The new name of the column. + */ + name: string; +}; +type ProjectsUpdateColumnRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsDeleteColumnEndpoint = { + /** + * column_id parameter + */ + column_id: number; +}; +type ProjectsDeleteColumnRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListCardsEndpoint = { + /** + * column_id parameter + */ + column_id: number; + /** + * Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. + */ + archived_state?: "all" | "archived" | "not_archived"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListCardsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsCreateCardEndpoint = { + /** + * column_id parameter + */ + column_id: number; + /** + * The card's note content. Only valid for cards without another type of content, so you must omit when specifying `content_id` and `content_type`. + */ + note?: string; + /** + * The issue or pull request id you want to associate with this card. You can use the [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) and [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoints to find this id. + * **Note:** Depending on whether you use the issue id or pull request id, you will need to specify `Issue` or `PullRequest` as the `content_type`. + */ + content_id?: number; + /** + * **Required if you provide `content_id`**. The type of content you want to associate with this card. Use `Issue` when `content_id` is an issue id and use `PullRequest` when `content_id` is a pull request id. + */ + content_type?: string; +}; +type ProjectsCreateCardRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsMoveColumnEndpoint = { + /** + * column_id parameter + */ + column_id: number; + /** + * Can be one of `first`, `last`, or `after:`, where `` is the `id` value of a column in the same project. + */ + position: string; +}; +type ProjectsMoveColumnRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsGetEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsUpdateEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * The name of the project. + */ + name?: string; + /** + * The description of the project. + */ + body?: string; + /** + * State of the project. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The permission level that determines whether all members of the project's organization can see and/or make changes to the project. Setting `organization_permission` is only available for organization projects. If an organization member belongs to a team with a higher level of access or is a collaborator with a higher level of access, their permission level is not lowered by `organization_permission`. For information on changing access for a team or collaborator, see [Add or update team project](https://developer.github.com/v3/teams/#add-or-update-team-project) or [Add user as a collaborator](https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator). + * + * **Note:** Updating a project's `organization_permission` requires `admin` access to the project. + * + * Can be one of: + * \* `read` - Organization members can read, but not write to or administer this project. + * \* `write` - Organization members can read and write, but not administer this project. + * \* `admin` - Organization members can read, write and administer this project. + * \* `none` - Organization members can only see this project if it is public. + */ + organization_permission?: string; + /** + * Sets the visibility of a project board. Setting `private` is only available for organization and user projects. **Note:** Updating a project's visibility requires `admin` access to the project. + * + * Can be one of: + * \* `false` - Anyone can see the project. + * \* `true` - Only the user can view a project board created on a user account. Organization members with the appropriate `organization_permission` can see project boards in an organization account. + */ + private?: boolean; +}; +type ProjectsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsDeleteEndpoint = { + /** + * project_id parameter + */ + project_id: number; +}; +type ProjectsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListCollaboratorsEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * Filters the collaborators by their affiliation. Can be one of: + * \* `outside`: Outside collaborators of a project that are not a member of the project's organization. + * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListCollaboratorsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsAddCollaboratorEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * username parameter + */ + username: string; + /** + * The permission to grant the collaborator. 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://developer.github.com/v3/#http-verbs)." Can be one of: + * \* `read` - can read, but not write to or administer this project. + * \* `write` - can read and write, but not administer this project. + * \* `admin` - can read, write and administer this project. + */ + permission?: "read" | "write" | "admin"; +}; +type ProjectsAddCollaboratorRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsRemoveCollaboratorEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * username parameter + */ + username: string; +}; +type ProjectsRemoveCollaboratorRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsReviewUserPermissionLevelEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * username parameter + */ + username: string; +}; +type ProjectsReviewUserPermissionLevelRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListColumnsEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListColumnsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsCreateColumnEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * The name of the column. + */ + name: string; +}; +type ProjectsCreateColumnRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type RateLimitGetEndpoint = {}; +type RateLimitGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsDeleteEndpoint = { + /** + * reaction_id parameter + */ + reaction_id: number; +}; +type ReactionsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the repository. + */ + name?: string; + /** + * A short description of the repository. + */ + description?: string; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to make the repository private or `false` to make it public. Creating private repositories requires a paid GitHub account. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.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://help.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. + */ + private?: boolean; + /** + * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `visibility` can also be `internal`. The `visibility` parameter overrides the `private` parameter when you use both along with the `nebula-preview` preview header. + */ + visibility?: "public" | "private" | "visibility" | "internal"; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * 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. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * Updates the default branch for this repository. + */ + default_branch?: string; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + */ + delete_branch_on_merge?: boolean; + /** + * `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + */ + archived?: boolean; +}; +type ReposUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListAssigneesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListAssigneesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesCheckAssigneeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * assignee parameter + */ + assignee: string; +}; +type IssuesCheckAssigneeRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposEnableAutomatedSecurityFixesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposEnableAutomatedSecurityFixesRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDisableAutomatedSecurityFixesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposDisableAutomatedSecurityFixesRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListBranchesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. + */ + protected?: boolean; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListBranchesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetBranchProtectionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetBranchProtectionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateBranchProtectionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * Require status checks to pass before merging. Set to `null` to disable. + */ + required_status_checks: ReposUpdateBranchProtectionParamsRequiredStatusChecks | null; + /** + * 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; + /** + * Require at least one approving review on a pull request, before merging. Set to `null` to disable. + */ + required_pull_request_reviews: ReposUpdateBranchProtectionParamsRequiredPullRequestReviews | null; + /** + * 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: ReposUpdateBranchProtectionParamsRestrictions | null; + /** + * 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://help.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. + */ + required_linear_history?: boolean; + /** + * 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://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." + */ + allow_force_pushes?: boolean | null; + /** + * 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://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. + */ + allow_deletions?: boolean; +}; +type ReposUpdateBranchProtectionRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveBranchProtectionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveBranchProtectionRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetProtectedBranchAdminEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetProtectedBranchAdminEnforcementRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchAdminEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposAddProtectedBranchAdminEnforcementRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchAdminEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveProtectedBranchAdminEnforcementRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetProtectedBranchPullRequestReviewEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetProtectedBranchPullRequestReviewEnforcementRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateProtectedBranchPullRequestReviewEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. + */ + dismissal_restrictions?: ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions; + /** + * Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. + */ + dismiss_stale_reviews?: boolean; + /** + * Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. + */ + require_code_owner_reviews?: boolean; + /** + * Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. + */ + required_approving_review_count?: number; +}; +type ReposUpdateProtectedBranchPullRequestReviewEnforcementRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchPullRequestReviewEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveProtectedBranchPullRequestReviewEnforcementRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetProtectedBranchRequiredSignaturesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetProtectedBranchRequiredSignaturesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchRequiredSignaturesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposAddProtectedBranchRequiredSignaturesRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchRequiredSignaturesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveProtectedBranchRequiredSignaturesRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetProtectedBranchRequiredStatusChecksEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetProtectedBranchRequiredStatusChecksRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateProtectedBranchRequiredStatusChecksEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * Require branches to be up to date before merging. + */ + strict?: boolean; + /** + * The list of status checks to require in order to merge into this branch + */ + contexts?: string[]; +}; +type ReposUpdateProtectedBranchRequiredStatusChecksRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchRequiredStatusChecksEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveProtectedBranchRequiredStatusChecksRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListProtectedBranchRequiredStatusChecksContextsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposReplaceProtectedBranchRequiredStatusChecksContextsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * contexts parameter + */ + contexts: string[]; +}; +type ReposReplaceProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchRequiredStatusChecksContextsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * contexts parameter + */ + contexts: string[]; +}; +type ReposAddProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchRequiredStatusChecksContextsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * contexts parameter + */ + contexts: string[]; +}; +type ReposRemoveProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetProtectedBranchRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetProtectedBranchRestrictionsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveProtectedBranchRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetAppsWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetAppsWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListAppsWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListAppsWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposReplaceProtectedBranchAppRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * apps parameter + */ + apps: string[]; +}; +type ReposReplaceProtectedBranchAppRestrictionsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchAppRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * apps parameter + */ + apps: string[]; +}; +type ReposAddProtectedBranchAppRestrictionsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchAppRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * apps parameter + */ + apps: string[]; +}; +type ReposRemoveProtectedBranchAppRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetTeamsWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetTeamsWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListProtectedBranchTeamRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListProtectedBranchTeamRestrictionsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListTeamsWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListTeamsWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposReplaceProtectedBranchTeamRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * teams parameter + */ + teams: string[]; +}; +type ReposReplaceProtectedBranchTeamRestrictionsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchTeamRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * teams parameter + */ + teams: string[]; +}; +type ReposAddProtectedBranchTeamRestrictionsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchTeamRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * teams parameter + */ + teams: string[]; +}; +type ReposRemoveProtectedBranchTeamRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetUsersWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetUsersWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListProtectedBranchUserRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListProtectedBranchUserRestrictionsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListUsersWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListUsersWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposReplaceProtectedBranchUserRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * users parameter + */ + users: string[]; +}; +type ReposReplaceProtectedBranchUserRestrictionsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchUserRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * users parameter + */ + users: string[]; +}; +type ReposAddProtectedBranchUserRestrictionsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchUserRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * users parameter + */ + users: string[]; +}; +type ReposRemoveProtectedBranchUserRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksCreateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the check. For example, "code-coverage". + */ + name: string; + /** + * The SHA of the commit. + */ + head_sha: string; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * 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; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * 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; + /** + * 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://developer.github.com/v3/checks/runs/#output-object) description. + */ + output?: ChecksCreateParamsOutput; + /** + * 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://developer.github.com/v3/activity/events/types/#checkrunevent) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksCreateParamsActions[]; +}; +type ChecksCreateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksUpdateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_run_id parameter + */ + check_run_id: number; + /** + * The name of the check. For example, "code-coverage". + */ + name?: string; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * 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; + /** + * 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://developer.github.com/v3/checks/runs/#output-object-1) description. + */ + output?: ChecksUpdateParamsOutput; + /** + * 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://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksUpdateParamsActions[]; +}; +type ChecksUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksGetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_run_id parameter + */ + check_run_id: number; +}; +type ChecksGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksListAnnotationsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_run_id parameter + */ + check_run_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ChecksListAnnotationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksCreateSuiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The sha of the head commit. + */ + head_sha: string; +}; +type ChecksCreateSuiteRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksSetSuitesPreferencesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://developer.github.com/v3/checks/suites/#auto_trigger_checks-object) description for details. + */ + auto_trigger_checks?: ChecksSetSuitesPreferencesParamsAutoTriggerChecks[]; +}; +type ChecksSetSuitesPreferencesRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksGetSuiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_suite_id parameter + */ + check_suite_id: number; +}; +type ChecksGetSuiteRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksListForSuiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_suite_id parameter + */ + check_suite_id: number; + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ChecksListForSuiteRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksRerequestSuiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_suite_id parameter + */ + check_suite_id: number; +}; +type ChecksRerequestSuiteRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListCollaboratorsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Filter collaborators returned by their affiliation. Can be one of: + * \* `outside`: All outside collaborators of an organization-owned repository. + * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListCollaboratorsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCheckCollaboratorEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * username parameter + */ + username: string; +}; +type ReposCheckCollaboratorRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddCollaboratorEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * username parameter + */ + username: string; + /** + * The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: + * \* `pull` - can pull, but not push to or administer this repository. + * \* `push` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push and administer this repository. + */ + permission?: "pull" | "push" | "admin"; +}; +type ReposAddCollaboratorRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveCollaboratorEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * username parameter + */ + username: string; +}; +type ReposRemoveCollaboratorRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCollaboratorPermissionLevelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * username parameter + */ + username: string; +}; +type ReposGetCollaboratorPermissionLevelRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListCommitCommentsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListCommitCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type ReposGetCommitCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The contents of the comment + */ + body: string; +}; +type ReposUpdateCommitCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type ReposDeleteCommitCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a commit comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForCommitCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the commit comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForCommitCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListCommitsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * 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 commits after 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`. + */ + since?: string; + /** + * Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + until?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListBranchesForHeadCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * commit_sha parameter + */ + commit_sha: string; +}; +type ReposListBranchesForHeadCommitRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListCommentsForCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * commit_sha parameter + */ + commit_sha: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListCommentsForCommitRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * commit_sha parameter + */ + commit_sha: string; + /** + * The contents of the comment. + */ + body: string; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; + /** + * **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. + */ + line?: number; +}; +type ReposCreateCommitCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListPullRequestsAssociatedWithCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * commit_sha parameter + */ + commit_sha: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListPullRequestsAssociatedWithCommitRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; +}; +type ReposGetCommitRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksListForRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ChecksListForRefRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksListSuitesForRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; + /** + * Filters check suites by GitHub App `id`. + */ + app_id?: number; + /** + * Filters checks suites by the name of the [check run](https://developer.github.com/v3/checks/runs/). + */ + check_name?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ChecksListSuitesForRefRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCombinedStatusForRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; +}; +type ReposGetCombinedStatusForRefRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListStatusesForRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListStatusesForRefRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type CodesOfConductGetForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type CodesOfConductGetForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRetrieveCommunityProfileMetricsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposRetrieveCommunityProfileMetricsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCompareCommitsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * base parameter + */ + base: string; + /** + * head parameter + */ + head: string; +}; +type ReposCompareCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetContentsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * path parameter + */ + path: string; + /** + * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) + */ + ref?: string; +}; +type ReposGetContentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateOrUpdateFileEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * path parameter + */ + path: string; + /** + * The commit message. + */ + message: string; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposCreateOrUpdateFileParamsCommitter; + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposCreateOrUpdateFileParamsAuthor; +}; +type ReposCreateOrUpdateFileRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateFileEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * path parameter + */ + path: string; + /** + * The commit message. + */ + message: string; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposCreateFileParamsCommitter; + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposCreateFileParamsAuthor; +}; +type ReposCreateFileRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateFileEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * path parameter + */ + path: string; + /** + * The commit message. + */ + message: string; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposUpdateFileParamsCommitter; + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposUpdateFileParamsAuthor; +}; +type ReposUpdateFileRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteFileEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * path parameter + */ + path: string; + /** + * The commit message. + */ + message: string; + /** + * The blob SHA of the file being replaced. + */ + sha: string; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * object containing information about the committer. + */ + committer?: ReposDeleteFileParamsCommitter; + /** + * object containing information about the author. + */ + author?: ReposDeleteFileParamsAuthor; +}; +type ReposDeleteFileRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListContributorsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Set to `1` or `true` to include anonymous contributors in results. + */ + anon?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListContributorsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListDeploymentsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * 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; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListDeploymentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateDeploymentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The ref to deploy. This can be a branch, tag, or SHA. + */ + ref: string; + /** + * Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; + /** + * Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + */ + auto_merge?: boolean; + /** + * The [status](https://developer.github.com/v3/repos/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[]; + /** + * JSON payload with extra information about the deployment. + */ + payload?: string; + /** + * Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + */ + environment?: string; + /** + * Short description of the deployment. + */ + description?: string; + /** + * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + transient_environment?: boolean; + /** + * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + production_environment?: boolean; +}; +type ReposCreateDeploymentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetDeploymentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * deployment_id parameter + */ + deployment_id: number; +}; +type ReposGetDeploymentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListDeploymentStatusesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * deployment_id parameter + */ + deployment_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListDeploymentStatusesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateDeploymentStatusEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * deployment_id parameter + */ + deployment_id: number; + /** + * The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * 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`. + */ + target_url?: string; + /** + * 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: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + log_url?: string; + /** + * A short description of the status. The maximum description length is 140 characters. + */ + description?: string; + /** + * Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + environment?: "production" | "staging" | "qa"; + /** + * Sets the URL for accessing your environment. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + environment_url?: string; + /** + * 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` + * **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + auto_inactive?: boolean; +}; +type ReposCreateDeploymentStatusRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetDeploymentStatusEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * deployment_id parameter + */ + deployment_id: number; + /** + * status_id parameter + */ + status_id: number; +}; +type ReposGetDeploymentStatusRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateDispatchEventEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * **Required:** A custom webhook event name. + */ + event_type?: string; + /** + * JSON payload with extra information about the webhook event that your action or worklow may use. + */ + client_payload?: ReposCreateDispatchEventParamsClientPayload; +}; +type ReposCreateDispatchEventRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListDownloadsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListDownloadsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetDownloadEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * download_id parameter + */ + download_id: number; +}; +type ReposGetDownloadRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteDownloadEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * download_id parameter + */ + download_id: number; +}; +type ReposDeleteDownloadRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListRepoEventsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListRepoEventsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListForksEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The sort order. Can be either `newest`, `oldest`, or `stargazers`. + */ + sort?: "newest" | "oldest" | "stargazers"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListForksRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateForkEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Optional parameter to specify the organization name if forking into an organization. + */ + organization?: string; +}; +type ReposCreateForkRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitCreateBlobEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The new blob's content. + */ + content: string; + /** + * The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + */ + encoding?: string; +}; +type GitCreateBlobRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitGetBlobEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * file_sha parameter + */ + file_sha: string; +}; +type GitGetBlobRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitCreateCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The commit message + */ + message: string; + /** + * The SHA of the tree object this commit points to + */ + tree: string; + /** + * 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[]; + /** + * 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?: GitCreateCommitParamsAuthor; + /** + * 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?: GitCreateCommitParamsCommitter; + /** + * 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; +}; +type GitCreateCommitRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitGetCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * commit_sha parameter + */ + commit_sha: string; +}; +type GitGetCommitRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitListMatchingRefsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GitListMatchingRefsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitGetRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; +}; +type GitGetRefRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitCreateRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * 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; + /** + * The SHA1 value for this reference. + */ + sha: string; +}; +type GitCreateRefRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitUpdateRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; + /** + * The SHA1 value to set this reference to + */ + sha: string; + /** + * 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. + */ + force?: boolean; +}; +type GitUpdateRefRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitDeleteRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; +}; +type GitDeleteRefRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitCreateTagEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The tag's name. This is typically a version (e.g., "v0.0.1"). + */ + tag: string; + /** + * The tag message. + */ + message: string; + /** + * The SHA of the git object this is tagging. + */ + object: string; + /** + * The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + */ + type: "commit" | "tree" | "blob"; + /** + * An object with information about the individual creating the tag. + */ + tagger?: GitCreateTagParamsTagger; +}; +type GitCreateTagRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitGetTagEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * tag_sha parameter + */ + tag_sha: string; +}; +type GitGetTagRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitCreateTreeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. + */ + tree: GitCreateTreeParamsTree[]; + /** + * The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. + */ + base_tree?: string; +}; +type GitCreateTreeRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitGetTreeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * tree_sha parameter + */ + tree_sha: string; + /** + * recursive parameter + */ + recursive?: "1"; +}; +type GitGetTreeRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListHooksEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListHooksRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. + */ + name?: string; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + */ + config: ReposCreateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; +}; +type ReposCreateHookRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type ReposGetHookRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * hook_id parameter + */ + hook_id: number; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + */ + config?: ReposUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. This replaces the entire array of events. + */ + events?: string[]; + /** + * Determines a list of events to be added to the list of events that the Hook triggers for. + */ + add_events?: string[]; + /** + * Determines a list of events to be removed from the list of events that the Hook triggers for. + */ + remove_events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; +}; +type ReposUpdateHookRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type ReposDeleteHookRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposPingHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type ReposPingHookRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposTestPushHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type ReposTestPushHookRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsStartImportEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The URL of the originating repository. + */ + vcs_url: string; + /** + * The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** + * If authentication is required, the username to provide to `vcs_url`. + */ + vcs_username?: string; + /** + * If authentication is required, the password to provide to `vcs_url`. + */ + vcs_password?: string; + /** + * For a tfvc import, the name of the project that is being imported. + */ + tfvc_project?: string; +}; +type MigrationsStartImportRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetImportProgressEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type MigrationsGetImportProgressRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsUpdateImportEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The username to provide to the originating repository. + */ + vcs_username?: string; + /** + * The password to provide to the originating repository. + */ + vcs_password?: string; +}; +type MigrationsUpdateImportRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsCancelImportEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type MigrationsCancelImportRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetCommitAuthorsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Only authors found after this id are returned. Provide the highest author ID you've seen so far. New authors may be added to the list at any point while the importer is performing the `raw` step. + */ + since?: string; +}; +type MigrationsGetCommitAuthorsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsMapCommitAuthorEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * author_id parameter + */ + author_id: number; + /** + * The new Git author email. + */ + email?: string; + /** + * The new Git author name. + */ + name?: string; +}; +type MigrationsMapCommitAuthorRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetLargeFilesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type MigrationsGetLargeFilesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsSetLfsPreferenceEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). + */ + use_lfs: "opt_in" | "opt_out"; +}; +type MigrationsSetLfsPreferenceRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsGetRepoInstallationEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type AppsGetRepoInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsFindRepoInstallationEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type AppsFindRepoInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsGetRestrictionsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type InteractionsGetRestrictionsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsAddOrUpdateRestrictionsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + */ + limit: "existing_users" | "contributors_only" | "collaborators_only"; +}; +type InteractionsAddOrUpdateRestrictionsForRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsRemoveRestrictionsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type InteractionsRemoveRestrictionsForRepoRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListInvitationsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListInvitationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteInvitationEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * invitation_id parameter + */ + invitation_id: number; +}; +type ReposDeleteInvitationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateInvitationEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * invitation_id parameter + */ + invitation_id: number; + /** + * The permissions that the associated user will have on the repository. Valid values are `read`, `write`, and `admin`. + */ + permissions?: "read" | "write" | "admin"; +}; +type ReposUpdateInvitationRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * 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?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesCreateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The title of the issue. + */ + title: string; + /** + * The contents of the issue. + */ + body?: string; + /** + * 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; + /** + * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ + */ + milestone?: number; + /** + * 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[]; + /** + * 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[]; +}; +type IssuesCreateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListCommentsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Either `created` or `updated`. + */ + sort?: "created" | "updated"; + /** + * Either `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; +}; +type IssuesListCommentsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesGetCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesGetCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesUpdateCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The contents of the comment. + */ + body: string; +}; +type IssuesUpdateCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesDeleteCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type IssuesDeleteCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForIssueCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForIssueCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForIssueCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForIssueCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListEventsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListEventsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesGetEventEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * event_id parameter + */ + event_id: number; +}; +type IssuesGetEventRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesGetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; +}; +type IssuesGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesUpdateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The title of the issue. + */ + title?: string; + /** + * The contents of the issue. + */ + body?: string; + /** + * Login for the user that this issue should be assigned to. **This field is deprecated.** + */ + assignee?: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + */ + milestone?: number | null; + /** + * 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[]; + /** + * 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[]; +}; +type IssuesUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesAddAssigneesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * 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[]; +}; +type IssuesAddAssigneesRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesRemoveAssigneesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * 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[]; +}; +type IssuesRemoveAssigneesRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListCommentsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesCreateCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The contents of the comment. + */ + body: string; +}; +type IssuesCreateCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListEventsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListEventsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListLabelsOnIssueEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListLabelsOnIssueRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesAddLabelsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The name of the label to add to the issue. Must contain at least one label. **Note:** 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. + */ + labels: string[]; +}; +type IssuesAddLabelsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesReplaceLabelsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** 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. + */ + labels?: string[]; +}; +type IssuesReplaceLabelsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesRemoveLabelsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; +}; +type IssuesRemoveLabelsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesRemoveLabelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * name parameter + */ + name: string; +}; +type IssuesRemoveLabelRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesLockEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * 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` + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; +}; +type IssuesLockRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesUnlockEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; +}; +type IssuesUnlockRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForIssueEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForIssueRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForIssueEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForIssueRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListEventsForTimelineEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListEventsForTimelineRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListDeployKeysEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListDeployKeysRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddDeployKeyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * A name for the key. + */ + title?: string; + /** + * The contents of the key. + */ + key: string; + /** + * 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://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; +}; +type ReposAddDeployKeyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetDeployKeyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * key_id parameter + */ + key_id: number; +}; +type ReposGetDeployKeyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveDeployKeyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * key_id parameter + */ + key_id: number; +}; +type ReposRemoveDeployKeyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListLabelsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListLabelsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesCreateLabelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * 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.com](http://emoji-cheat-sheet.com/). + */ + name: string; + /** + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + */ + color: string; + /** + * A short description of the label. + */ + description?: string; +}; +type IssuesCreateLabelRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesGetLabelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * name parameter + */ + name: string; +}; +type IssuesGetLabelRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesUpdateLabelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * name parameter + */ + name: string; + /** + * 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.com](http://emoji-cheat-sheet.com/). + */ + new_name?: string; + /** + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + */ + color?: string; + /** + * A short description of the label. + */ + description?: string; +}; +type IssuesUpdateLabelRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesDeleteLabelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * name parameter + */ + name: string; +}; +type IssuesDeleteLabelRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListLanguagesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposListLanguagesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type LicensesGetForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type LicensesGetForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposMergeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the base branch that the head will be merged into. + */ + base: string; + /** + * The head to merge. This can be a branch name or a commit SHA1. + */ + head: string; + /** + * Commit message to use for the merge commit. If omitted, a default message will be used. + */ + commit_message?: string; +}; +type ReposMergeRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListMilestonesForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The state of the milestone. Either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * What to sort results by. Either `due_on` or `completeness`. + */ + sort?: "due_on" | "completeness"; + /** + * The direction of the sort. Either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListMilestonesForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesCreateMilestoneEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The title of the milestone. + */ + title: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * A description of the milestone. + */ + description?: string; + /** + * 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; +}; +type IssuesCreateMilestoneRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesGetMilestoneEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * milestone_number parameter + */ + milestone_number: number; +}; +type IssuesGetMilestoneRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesUpdateMilestoneEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * milestone_number parameter + */ + milestone_number: number; + /** + * The title of the milestone. + */ + title?: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * A description of the milestone. + */ + description?: string; + /** + * 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; +}; +type IssuesUpdateMilestoneRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesDeleteMilestoneEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * milestone_number parameter + */ + milestone_number: number; +}; +type IssuesDeleteMilestoneRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListLabelsForMilestoneEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * milestone_number parameter + */ + milestone_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListLabelsForMilestoneRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListNotificationsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * 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; + /** + * 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; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListNotificationsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityMarkNotificationsAsReadForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. 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; +}; +type ActivityMarkNotificationsAsReadForRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetPagesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetPagesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposEnablePagesSiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * source parameter + */ + source?: ReposEnablePagesSiteParamsSource; +}; +type ReposEnablePagesSiteRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDisablePagesSiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposDisablePagesSiteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateInformationAboutPagesSiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * 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://help.github.com/articles/using-a-custom-domain-with-github-pages/)." + */ + cname?: string; + /** + * Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master /docs"`. + */ + source?: '"gh-pages"' | '"master"' | '"master /docs"'; +}; +type ReposUpdateInformationAboutPagesSiteRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRequestPageBuildEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposRequestPageBuildRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListPagesBuildsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListPagesBuildsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetLatestPagesBuildEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetLatestPagesBuildRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetPagesBuildEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * build_id parameter + */ + build_id: number; +}; +type ReposGetPagesBuildRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsCreateForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the project. + */ + name: string; + /** + * The description of the project. + */ + body?: string; +}; +type ProjectsCreateForRepoRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Either `open`, `closed`, or `all` to filter by state. + */ + state?: "open" | "closed" | "all"; + /** + * Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. + */ + head?: string; + /** + * Filter pulls by base branch name. Example: `gh-pages`. + */ + base?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). + */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** + * The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The title of the new pull request. + */ + title: string; + /** + * 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; + /** + * 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; + /** + * The contents of the pull request. + */ + body?: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + /** + * Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. + */ + draft?: boolean; +}; +type PullsCreateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListCommentsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListCommentsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsGetCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type PullsGetCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsUpdateCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The text of the reply to the review comment. + */ + body: string; +}; +type PullsUpdateCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsDeleteCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type PullsDeleteCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForPullRequestReviewCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a pull request review comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForPullRequestReviewCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForPullRequestReviewCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the pull request review comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForPullRequestReviewCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsGetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; +}; +type PullsGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsUpdateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * The title of the pull request. + */ + title?: string; + /** + * The contents of the pull request. + */ + body?: string; + /** + * State of this Pull Request. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * 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; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; +}; +type PullsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListCommentsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * The text of the review comment. + */ + body: string; + /** + * 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; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. 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; + /** + * **Required with `comfort-fade` preview**. 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://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required with `comfort-fade` preview**. 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; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.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. + */ + start_side?: "LEFT" | "RIGHT" | "side"; +}; +type PullsCreateCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateCommentReplyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * The text of the review comment. + */ + body: string; + /** + * 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; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. 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; + /** + * **Required with `comfort-fade` preview**. 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://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required with `comfort-fade` preview**. 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; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.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. + */ + start_side?: "LEFT" | "RIGHT" | "side"; +}; +type PullsCreateCommentReplyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateReviewCommentReplyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The text of the review comment. + */ + body: string; +}; +type PullsCreateReviewCommentReplyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListCommitsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListFilesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListFilesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCheckIfMergedEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; +}; +type PullsCheckIfMergedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsMergeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Title for the automatic commit message. + */ + commit_title?: string; + /** + * Extra detail to append to automatic commit message. + */ + commit_message?: string; + /** + * SHA that pull request head must match to allow merge. + */ + sha?: string; + /** + * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + */ + merge_method?: "merge" | "squash" | "rebase"; +}; +type PullsMergeRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListReviewRequestsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListReviewRequestsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateReviewRequestEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * An array of user `login`s that will be requested. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be requested. + */ + team_reviewers?: string[]; +}; +type PullsCreateReviewRequestRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsDeleteReviewRequestEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * An array of user `login`s that will be removed. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be removed. + */ + team_reviewers?: string[]; +}; +type PullsDeleteReviewRequestRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListReviewsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListReviewsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * 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; + /** + * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. + */ + body?: string; + /** + * 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://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** + * Use the following table to specify the location, destination, and contents of the draft review comment. + */ + comments?: PullsCreateReviewParamsComments[]; +}; +type PullsCreateReviewRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsGetReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; +}; +type PullsGetReviewRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsDeletePendingReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; +}; +type PullsDeletePendingReviewRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsUpdateReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; + /** + * The body text of the pull request review. + */ + body: string; +}; +type PullsUpdateReviewRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsGetCommentsForReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsGetCommentsForReviewRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsDismissReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; + /** + * The message for the pull request review dismissal + */ + message: string; +}; +type PullsDismissReviewRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsSubmitReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; + /** + * The body text of the pull request review + */ + body?: string; + /** + * 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. + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; +}; +type PullsSubmitReviewRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsUpdateBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * 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 on a repository](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. + */ + expected_head_sha?: string; +}; +type PullsUpdateBranchRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetReadmeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) + */ + ref?: string; +}; +type ReposGetReadmeRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListReleasesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListReleasesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the tag. + */ + tag_name: string; + /** + * 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; + /** + * The name of the release. + */ + name?: string; + /** + * Text describing the contents of the tag. + */ + body?: string; + /** + * `true` to create a draft (unpublished) release, `false` to create a published one. + */ + draft?: boolean; + /** + * `true` to identify the release as a prerelease. `false` to identify the release as a full release. + */ + prerelease?: boolean; +}; +type ReposCreateReleaseRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetReleaseAssetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * asset_id parameter + */ + asset_id: number; +}; +type ReposGetReleaseAssetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateReleaseAssetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * asset_id parameter + */ + asset_id: number; + /** + * The file name of the asset. + */ + name?: string; + /** + * An alternate short description of the asset. Used in place of the filename. + */ + label?: string; +}; +type ReposUpdateReleaseAssetRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteReleaseAssetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * asset_id parameter + */ + asset_id: number; +}; +type ReposDeleteReleaseAssetRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetLatestReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetLatestReleaseRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetReleaseByTagEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * tag parameter + */ + tag: string; +}; +type ReposGetReleaseByTagRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * release_id parameter + */ + release_id: number; +}; +type ReposGetReleaseRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * release_id parameter + */ + release_id: number; + /** + * The name of the tag. + */ + tag_name?: string; + /** + * 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; + /** + * The name of the release. + */ + name?: string; + /** + * Text describing the contents of the tag. + */ + body?: string; + /** + * `true` makes the release a draft, and `false` publishes the release. + */ + draft?: boolean; + /** + * `true` to identify the release as a prerelease, `false` to identify the release as a full release. + */ + prerelease?: boolean; +}; +type ReposUpdateReleaseRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * release_id parameter + */ + release_id: number; +}; +type ReposDeleteReleaseRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListAssetsForReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * release_id parameter + */ + release_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListAssetsForReleaseRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListStargazersForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListStargazersForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCodeFrequencyStatsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetCodeFrequencyStatsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCommitActivityStatsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetCommitActivityStatsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetContributorsStatsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetContributorsStatsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetParticipationStatsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetParticipationStatsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetPunchCardStatsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetPunchCardStatsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateStatusEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * sha parameter + */ + sha: string; + /** + * The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. + */ + state: "error" | "failure" | "pending" | "success"; + /** + * 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; + /** + * A short description of the status. + */ + description?: string; + /** + * A string label to differentiate this status from the status of other systems. + */ + context?: string; +}; +type ReposCreateStatusRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListWatchersForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListWatchersForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityGetRepoSubscriptionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityGetRepoSubscriptionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivitySetRepoSubscriptionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Determines if notifications should be received from this repository. + */ + subscribed?: boolean; + /** + * Determines if all notifications should be blocked from this repository. + */ + ignored?: boolean; +}; +type ActivitySetRepoSubscriptionRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityDeleteRepoSubscriptionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityDeleteRepoSubscriptionRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListTagsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListTagsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListTeamsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListTeamsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListTopicsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposListTopicsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposReplaceTopicsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * 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[]; +}; +type ReposReplaceTopicsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetClonesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Must be one of: `day`, `week`. + */ + per?: "day" | "week"; +}; +type ReposGetClonesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetTopPathsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetTopPathsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetTopReferrersEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetTopReferrersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetViewsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Must be one of: `day`, `week`. + */ + per?: "day" | "week"; +}; +type ReposGetViewsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposTransferEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * **Required:** The username or organization name the repository will be transferred to. + */ + new_owner?: string; + /** + * ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + */ + team_ids?: number[]; +}; +type ReposTransferRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCheckVulnerabilityAlertsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposCheckVulnerabilityAlertsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposEnableVulnerabilityAlertsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposEnableVulnerabilityAlertsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDisableVulnerabilityAlertsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposDisableVulnerabilityAlertsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetArchiveLinkEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * archive_format parameter + */ + archive_format: string; + /** + * ref parameter + */ + ref: string; +}; +type ReposGetArchiveLinkRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateUsingTemplateEndpoint = { + /** + * template_owner parameter + */ + template_owner: string; + /** + * template_repo parameter + */ + template_repo: string; + /** + * 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; + /** + * The name of the new repository. + */ + name: string; + /** + * A short description of the new repository. + */ + description?: string; + /** + * Either `true` to create a new private repository or `false` to create a new public one. + */ + private?: boolean; +}; +type ReposCreateUsingTemplateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListPublicEndpoint = { + /** + * The integer ID of the last Repository that you've seen. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListPublicRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimListProvisionedIdentitiesEndpoint = { + /** + * org parameter + */ + org: string; + /** + * 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\"`. + */ + filter?: string; +}; +type ScimListProvisionedIdentitiesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimProvisionAndInviteUsersEndpoint = { + /** + * org parameter + */ + org: string; +}; +type ScimProvisionAndInviteUsersRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimProvisionInviteUsersEndpoint = { + /** + * org parameter + */ + org: string; +}; +type ScimProvisionInviteUsersRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimGetProvisioningDetailsForUserEndpoint = { + /** + * org parameter + */ + org: string; + /** + * scim_user_id parameter + */ + scim_user_id: number; +}; +type ScimGetProvisioningDetailsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimReplaceProvisionedUserInformationEndpoint = { + /** + * org parameter + */ + org: string; + /** + * scim_user_id parameter + */ + scim_user_id: number; +}; +type ScimReplaceProvisionedUserInformationRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimUpdateProvisionedOrgMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * scim_user_id parameter + */ + scim_user_id: number; +}; +type ScimUpdateProvisionedOrgMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimUpdateUserAttributeEndpoint = { + /** + * org parameter + */ + org: string; + /** + * scim_user_id parameter + */ + scim_user_id: number; +}; +type ScimUpdateUserAttributeRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimRemoveUserFromOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * scim_user_id parameter + */ + scim_user_id: number; +}; +type ScimRemoveUserFromOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchCodeEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching code](https://help.github.com/articles/searching-code/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://developer.github.com/v3/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?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchCodeRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchCommitsEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching commits](https://help.github.com/articles/searching-commits/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://developer.github.com/v3/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?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchIssuesAndPullRequestsEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/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?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchIssuesAndPullRequestsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchIssuesEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/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?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchIssuesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchLabelsEndpoint = { + /** + * 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://developer.github.com/v3/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://developer.github.com/v3/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?: "desc" | "asc"; +}; +type SearchLabelsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchReposEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching for repositories](https://help.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://developer.github.com/v3/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?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchReposRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchTopicsEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). + */ + q: string; +}; +type SearchTopicsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchUsersEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching users](https://help.github.com/articles/searching-users/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://developer.github.com/v3/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?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchUsersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; +}; +type TeamsGetLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetEndpoint = { + /** + * team_id parameter + */ + team_id: number; +}; +type TeamsGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * The name of the team. + */ + name: string; + /** + * The description of the team. + */ + description?: string; + /** + * 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. + */ + privacy?: "secret" | "closed"; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + */ + permission?: "pull" | "push" | "admin"; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; +}; +type TeamsUpdateLegacyRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * The name of the team. + */ + name: string; + /** + * The description of the team. + */ + description?: string; + /** + * 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. + */ + privacy?: "secret" | "closed"; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + */ + permission?: "pull" | "push" | "admin"; + /** + * The ID of a team to set as the parent team. + */ + parent_team_id?: number; +}; +type TeamsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; +}; +type TeamsDeleteLegacyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteEndpoint = { + /** + * team_id parameter + */ + team_id: number; +}; +type TeamsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListDiscussionsLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListDiscussionsLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListDiscussionsEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListDiscussionsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateDiscussionLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * The discussion post's title. + */ + title: string; + /** + * The discussion post's body text. + */ + body: string; + /** + * 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. + */ + private?: boolean; +}; +type TeamsCreateDiscussionLegacyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * The discussion post's title. + */ + title: string; + /** + * The discussion post's body text. + */ + body: string; + /** + * 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. + */ + private?: boolean; +}; +type TeamsCreateDiscussionRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetDiscussionLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; +}; +type TeamsGetDiscussionLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; +}; +type TeamsGetDiscussionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateDiscussionLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The discussion post's title. + */ + title?: string; + /** + * The discussion post's body text. + */ + body?: string; +}; +type TeamsUpdateDiscussionLegacyRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The discussion post's title. + */ + title?: string; + /** + * The discussion post's body text. + */ + body?: string; +}; +type TeamsUpdateDiscussionRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteDiscussionLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; +}; +type TeamsDeleteDiscussionLegacyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; +}; +type TeamsDeleteDiscussionRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListDiscussionCommentsLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListDiscussionCommentsLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListDiscussionCommentsEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListDiscussionCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateDiscussionCommentLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The discussion comment's body text. + */ + body: string; +}; +type TeamsCreateDiscussionCommentLegacyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The discussion comment's body text. + */ + body: string; +}; +type TeamsCreateDiscussionCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetDiscussionCommentLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; +}; +type TeamsGetDiscussionCommentLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; +}; +type TeamsGetDiscussionCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateDiscussionCommentLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * The discussion comment's body text. + */ + body: string; +}; +type TeamsUpdateDiscussionCommentLegacyRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * The discussion comment's body text. + */ + body: string; +}; +type TeamsUpdateDiscussionCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteDiscussionCommentLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; +}; +type TeamsDeleteDiscussionCommentLegacyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; +}; +type TeamsDeleteDiscussionCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForTeamDiscussionCommentLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForTeamDiscussionCommentLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForTeamDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForTeamDiscussionCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForTeamDiscussionCommentLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForTeamDiscussionCommentLegacyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForTeamDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForTeamDiscussionCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForTeamDiscussionLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForTeamDiscussionLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForTeamDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForTeamDiscussionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForTeamDiscussionLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForTeamDiscussionLegacyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForTeamDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForTeamDiscussionRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListPendingInvitationsLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListPendingInvitationsLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListPendingInvitationsEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListPendingInvitationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListMembersLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: "member" | "maintainer" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListMembersLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListMembersEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: "member" | "maintainer" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListMembersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetMemberLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsGetMemberLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetMemberEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsGetMemberRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddMemberLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsAddMemberLegacyRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddMemberEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsAddMemberRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveMemberLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsRemoveMemberLegacyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetMembershipLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsGetMembershipLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetMembershipEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsGetMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateMembershipLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; +}; +type TeamsAddOrUpdateMembershipLegacyRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateMembershipEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; +}; +type TeamsAddOrUpdateMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveMembershipLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsRemoveMembershipLegacyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListProjectsLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListProjectsLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListProjectsEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListProjectsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsReviewProjectLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * project_id parameter + */ + project_id: number; +}; +type TeamsReviewProjectLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsReviewProjectEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * project_id parameter + */ + project_id: number; +}; +type TeamsReviewProjectRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateProjectLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * project_id parameter + */ + project_id: number; + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + permission?: "read" | "write" | "admin"; +}; +type TeamsAddOrUpdateProjectLegacyRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateProjectEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * project_id parameter + */ + project_id: number; + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + permission?: "read" | "write" | "admin"; +}; +type TeamsAddOrUpdateProjectRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveProjectLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * project_id parameter + */ + project_id: number; +}; +type TeamsRemoveProjectLegacyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveProjectEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * project_id parameter + */ + project_id: number; +}; +type TeamsRemoveProjectRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListReposLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListReposLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListReposEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListReposRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCheckManagesRepoLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type TeamsCheckManagesRepoLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCheckManagesRepoEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type TeamsCheckManagesRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateRepoLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + */ + permission?: "pull" | "push" | "admin"; +}; +type TeamsAddOrUpdateRepoLegacyRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateRepoEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + */ + permission?: "pull" | "push" | "admin"; +}; +type TeamsAddOrUpdateRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveRepoLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type TeamsRemoveRepoLegacyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveRepoEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type TeamsRemoveRepoRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListIdPGroupsForLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; +}; +type TeamsListIdPGroupsForLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListIdPGroupsForEndpoint = { + /** + * team_id parameter + */ + team_id: number; +}; +type TeamsListIdPGroupsForRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateOrUpdateIdPGroupConnectionsLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * 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: TeamsCreateOrUpdateIdPGroupConnectionsLegacyParamsGroups[]; +}; +type TeamsCreateOrUpdateIdPGroupConnectionsLegacyRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateOrUpdateIdPGroupConnectionsEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * 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: TeamsCreateOrUpdateIdPGroupConnectionsParamsGroups[]; +}; +type TeamsCreateOrUpdateIdPGroupConnectionsRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListChildLegacyEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListChildLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListChildEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListChildRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersGetAuthenticatedEndpoint = {}; +type UsersGetAuthenticatedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersUpdateAuthenticatedEndpoint = { + /** + * The new name of the user. + */ + name?: string; + /** + * The publicly visible email address of the user. + */ + email?: string; + /** + * The new blog URL of the user. + */ + blog?: string; + /** + * The new company of the user. + */ + company?: string; + /** + * The new location of the user. + */ + location?: string; + /** + * The new hiring availability of the user. + */ + hireable?: boolean; + /** + * The new short biography of the user. + */ + bio?: string; +}; +type UsersUpdateAuthenticatedRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListBlockedEndpoint = {}; +type UsersListBlockedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersCheckBlockedEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersCheckBlockedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersBlockEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersBlockRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersUnblockEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersUnblockRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersTogglePrimaryEmailVisibilityEndpoint = { + /** + * Specify the _primary_ email address that needs a visibility change. + */ + email: string; + /** + * Use `public` to enable an authenticated user to view the specified email address, or use `private` so this primary email address cannot be seen publicly. + */ + visibility: string; +}; +type UsersTogglePrimaryEmailVisibilityRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListEmailsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListEmailsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersAddEmailsEndpoint = { + /** + * Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + */ + emails: string[]; +}; +type UsersAddEmailsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersDeleteEmailsEndpoint = { + /** + * Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + */ + emails: string[]; +}; +type UsersDeleteEmailsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListFollowersForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListFollowersForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListFollowingForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListFollowingForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersCheckFollowingEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersCheckFollowingRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersFollowEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersFollowRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersUnfollowEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersUnfollowRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListGpgKeysEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListGpgKeysRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersCreateGpgKeyEndpoint = { + /** + * Your GPG key, generated in ASCII-armored format. See "[Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/)" for help creating a GPG key. + */ + armored_public_key?: string; +}; +type UsersCreateGpgKeyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersGetGpgKeyEndpoint = { + /** + * gpg_key_id parameter + */ + gpg_key_id: number; +}; +type UsersGetGpgKeyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersDeleteGpgKeyEndpoint = { + /** + * gpg_key_id parameter + */ + gpg_key_id: number; +}; +type UsersDeleteGpgKeyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListInstallationsForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListInstallationsForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListInstallationReposForAuthenticatedUserEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListInstallationReposForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsAddRepoToInstallationEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; + /** + * repository_id parameter + */ + repository_id: number; +}; +type AppsAddRepoToInstallationRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsRemoveRepoFromInstallationEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; + /** + * repository_id parameter + */ + repository_id: number; +}; +type AppsRemoveRepoFromInstallationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListForAuthenticatedUserEndpoint = { + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "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?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListPublicKeysEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListPublicKeysRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersCreatePublicKeyEndpoint = { + /** + * A descriptive name for the new key. Use a name that will help you recognize this key in your GitHub account. For example, if you're using a personal Mac, you might call this key "Personal MacBook Air". + */ + title?: string; + /** + * The public SSH key to add to your GitHub account. See "[Generating a new SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)" for guidance on how to create a public SSH key. + */ + key?: string; +}; +type UsersCreatePublicKeyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersGetPublicKeyEndpoint = { + /** + * key_id parameter + */ + key_id: number; +}; +type UsersGetPublicKeyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersDeletePublicKeyEndpoint = { + /** + * key_id parameter + */ + key_id: number; +}; +type UsersDeletePublicKeyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListMarketplacePurchasesForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListMarketplacePurchasesForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListMarketplacePurchasesForAuthenticatedUserStubbedEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListMarketplacePurchasesForAuthenticatedUserStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListMembershipsEndpoint = { + /** + * 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"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListMembershipsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsGetMembershipForAuthenticatedUserEndpoint = { + /** + * org parameter + */ + org: string; +}; +type OrgsGetMembershipForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsUpdateMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * The state that the membership should be in. Only `"active"` will be accepted. + */ + state: "active"; +}; +type OrgsUpdateMembershipRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsStartForAuthenticatedUserEndpoint = { + /** + * An array of repositories to include in the migration. + */ + repositories: string[]; + /** + * Locks the `repositories` to prevent changes during the migration when set to `true`. + */ + lock_repositories?: boolean; + /** + * Does not include attachments uploaded to GitHub.com in the migration data when set to `true`. Excluding attachments will reduce the migration archive file size. + */ + exclude_attachments?: boolean; +}; +type MigrationsStartForAuthenticatedUserRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsListForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type MigrationsListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetStatusForAuthenticatedUserEndpoint = { + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsGetStatusForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetArchiveForAuthenticatedUserEndpoint = { + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsGetArchiveForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsDeleteArchiveForAuthenticatedUserEndpoint = { + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsDeleteArchiveForAuthenticatedUserRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsUnlockRepoForAuthenticatedUserEndpoint = { + /** + * migration_id parameter + */ + migration_id: number; + /** + * repo_name parameter + */ + repo_name: string; +}; +type MigrationsUnlockRepoForAuthenticatedUserRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsCreateForAuthenticatedUserEndpoint = { + /** + * The name of the project. + */ + name: string; + /** + * The description of the project. + */ + body?: string; +}; +type ProjectsCreateForAuthenticatedUserRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListPublicEmailsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListPublicEmailsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListEndpoint = { + /** + * Can be one of `all`, `public`, or `private`. + */ + 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; + /** + * Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` + * + * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. + */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateForAuthenticatedUserEndpoint = { + /** + * The name of the repository. + */ + name: string; + /** + * A short description of the repository. + */ + description?: string; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + */ + private?: boolean; + /** + * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `visibility` can also be `internal`. For more information, see "[Creating an internal repository](https://help.github.com/github/creating-cloning-and-archiving-repositories/creating-an-internal-repository)" in the GitHub Help documentation. + * The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header. + */ + visibility?: "public" | "private" | "visibility" | "internal"; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * 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. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * 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; + /** + * Pass `true` to create an initial commit with empty README. + */ + auto_init?: boolean; + /** + * 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; + /** + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.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; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + */ + delete_branch_on_merge?: boolean; +}; +type ReposCreateForAuthenticatedUserRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListInvitationsForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListInvitationsForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAcceptInvitationEndpoint = { + /** + * invitation_id parameter + */ + invitation_id: number; +}; +type ReposAcceptInvitationRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeclineInvitationEndpoint = { + /** + * invitation_id parameter + */ + invitation_id: number; +}; +type ReposDeclineInvitationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListReposStarredByAuthenticatedUserEndpoint = { + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListReposStarredByAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityCheckStarringRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityCheckStarringRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityStarRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityStarRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityUnstarRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityUnstarRepoRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListWatchedReposForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListWatchedReposForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityCheckWatchingRepoLegacyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityCheckWatchingRepoLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityWatchRepoLegacyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityWatchRepoLegacyRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityStopWatchingRepoLegacyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityStopWatchingRepoLegacyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsListReposForUserEndpoint = { + /** + * migration_id parameter + */ + migration_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type MigrationsListReposForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListEndpoint = { + /** + * The integer ID of the last User that you've seen. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersGetByUsernameEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersGetByUsernameRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListEventsForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListEventsForOrgEndpoint = { + /** + * username parameter + */ + username: string; + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListEventsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListPublicEventsForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListPublicEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListFollowersForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListFollowersForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListFollowingForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListFollowingForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersCheckFollowingForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * target_user parameter + */ + target_user: string; +}; +type UsersCheckFollowingForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListPublicForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListPublicForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListGpgKeysForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListGpgKeysForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersGetContextForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * 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; +}; +type UsersGetContextForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsGetUserInstallationEndpoint = { + /** + * username parameter + */ + username: string; +}; +type AppsGetUserInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsFindUserInstallationEndpoint = { + /** + * username parameter + */ + username: string; +}; +type AppsFindUserInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListPublicKeysForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListPublicKeysForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListReceivedEventsForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListReceivedEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListReceivedPublicEventsForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListReceivedPublicEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Can be one of `all`, `owner`, `member`. + */ + type?: "all" | "owner" | "member"; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListReposStarredByUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListReposStarredByUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListReposWatchedByUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListReposWatchedByUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; + +export type AppsCreateInstallationTokenParamsPermissions = {}; +export type GistsCreateParamsFiles = { + content?: string; +}; +export type GistsUpdateParamsFiles = { + content?: string; + filename?: string; +}; +export type OrgsCreateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; +}; +export type OrgsUpdateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; +}; +export type TeamsCreateOrUpdateIdPGroupConnectionsInOrgParamsGroups = { + group_id: string; + group_name: string; + group_description: string; +}; +export type ReposUpdateBranchProtectionParamsRequiredStatusChecks = { + strict: boolean; + contexts: string[]; +}; +export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviews = { + dismissal_restrictions?: ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; +}; +export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions = { + users?: string[]; + teams?: string[]; +}; +export type ReposUpdateBranchProtectionParamsRestrictions = { + users: string[]; + teams: string[]; + apps?: string[]; +}; +export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions = { + users?: string[]; + teams?: string[]; +}; +export type ChecksCreateParamsOutput = { + title: string; + summary: string; + text?: string; + annotations?: ChecksCreateParamsOutputAnnotations[]; + images?: ChecksCreateParamsOutputImages[]; +}; +export type ChecksCreateParamsOutputAnnotations = { + path: string; + start_line: number; + end_line: number; + start_column?: number; + end_column?: number; + annotation_level: "notice" | "warning" | "failure"; + message: string; + title?: string; + raw_details?: string; +}; +export type ChecksCreateParamsOutputImages = { + alt: string; + image_url: string; + caption?: string; +}; +export type ChecksCreateParamsActions = { + label: string; + description: string; + identifier: string; +}; +export type ChecksUpdateParamsOutput = { + title?: string; + summary: string; + text?: string; + annotations?: ChecksUpdateParamsOutputAnnotations[]; + images?: ChecksUpdateParamsOutputImages[]; +}; +export type ChecksUpdateParamsOutputAnnotations = { + path: string; + start_line: number; + end_line: number; + start_column?: number; + end_column?: number; + annotation_level: "notice" | "warning" | "failure"; + message: string; + title?: string; + raw_details?: string; +}; +export type ChecksUpdateParamsOutputImages = { + alt: string; + image_url: string; + caption?: string; +}; +export type ChecksUpdateParamsActions = { + label: string; + description: string; + identifier: string; +}; +export type ChecksSetSuitesPreferencesParamsAutoTriggerChecks = { + app_id: number; + setting: boolean; +}; +export type ReposCreateOrUpdateFileParamsCommitter = { + name: string; + email: string; +}; +export type ReposCreateOrUpdateFileParamsAuthor = { + name: string; + email: string; +}; +export type ReposCreateFileParamsCommitter = { + name: string; + email: string; +}; +export type ReposCreateFileParamsAuthor = { + name: string; + email: string; +}; +export type ReposUpdateFileParamsCommitter = { + name: string; + email: string; +}; +export type ReposUpdateFileParamsAuthor = { + name: string; + email: string; +}; +export type ReposDeleteFileParamsCommitter = { + name?: string; + email?: string; +}; +export type ReposDeleteFileParamsAuthor = { + name?: string; + email?: string; +}; +export type ReposCreateDispatchEventParamsClientPayload = {}; +export type GitCreateCommitParamsAuthor = { + name?: string; + email?: string; + date?: string; +}; +export type GitCreateCommitParamsCommitter = { + name?: string; + email?: string; + date?: string; +}; +export type GitCreateTagParamsTagger = { + name?: string; + email?: string; + date?: string; +}; +export type GitCreateTreeParamsTree = { + path?: string; + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + type?: "blob" | "tree" | "commit"; + sha?: string | null; + content?: string; +}; +export type ReposCreateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; +}; +export type ReposUpdateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; +}; +export type ReposEnablePagesSiteParamsSource = { + branch?: "master" | "gh-pages"; + path?: string; +}; +export type PullsCreateReviewParamsComments = { + path: string; + position: number; + body: string; +}; +export type TeamsCreateOrUpdateIdPGroupConnectionsLegacyParamsGroups = { + group_id: string; + group_name: string; + group_description: string; +}; +export type TeamsCreateOrUpdateIdPGroupConnectionsParamsGroups = { + group_id: string; + group_name: string; + group_description: string; +}; diff --git a/node_modules/@octokit/types/src/generated/README.md b/node_modules/@octokit/types/src/generated/README.md new file mode 100644 index 00000000..2bc90d20 --- /dev/null +++ b/node_modules/@octokit/types/src/generated/README.md @@ -0,0 +1,3 @@ +# ⚠️ Do not edit files in this folder + +All files are generated. Manual changes will be overwritten. If you find a problem, please look into how they are generated. When in doubt, please open a new issue. diff --git a/node_modules/@octokit/types/src/index.ts b/node_modules/@octokit/types/src/index.ts new file mode 100644 index 00000000..200f0a24 --- /dev/null +++ b/node_modules/@octokit/types/src/index.ts @@ -0,0 +1,18 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +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"; diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/node/LICENSE @@ -0,0 +1,21 @@ + 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 diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md new file mode 100644 index 00000000..2b406156 --- /dev/null +++ b/node_modules/@types/node/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/node` + +# Summary +This package contains type definitions for Node.js (http://nodejs.org/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. + +### Additional Details + * Last updated: Mon, 25 Nov 2019 22:58:16 GMT + * Dependencies: none + * Global values: `Buffer`, `NodeJS`, `Symbol`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout` + +# Credits +These definitions were written by Microsoft TypeScript (https://github.com/Microsoft), DefinitelyTyped (https://github.com/DefinitelyTyped), Alberto Schiabel (https://github.com/jkomyno), Alexander T. (https://github.com/a-tarasyuk), Alvis HT Tang (https://github.com/alvis), Andrew Makarov (https://github.com/r3nya), Benjamin Toueg (https://github.com/btoueg), Bruno Scheufler (https://github.com/brunoscheufler), Chigozirim C. (https://github.com/smac89), Christian Vaagland Tellnes (https://github.com/tellnes), David Junger (https://github.com/touffy), Deividas Bakanas (https://github.com/DeividasBakanas), Eugene Y. Q. Shen (https://github.com/eyqs), Flarna (https://github.com/Flarna), Hannes Magnusson (https://github.com/Hannes-Magnusson-CK), Hoàng Văn Khải (https://github.com/KSXGitHub), Huw (https://github.com/hoo29), Kelvin Jin (https://github.com/kjin), Klaus Meinhardt (https://github.com/ajafff), Lishude (https://github.com/islishude), Mariusz Wiktorczyk (https://github.com/mwiktorczyk), Mohsen Azimi (https://github.com/mohsen1), Nicolas Even (https://github.com/n-e), Nicolas Voigt (https://github.com/octo-sniffle), Nikita Galkin (https://github.com/galkin), Parambir Singh (https://github.com/parambirs), Sebastian Silbermann (https://github.com/eps1lon), Simon Schick (https://github.com/SimonSchick), Thomas den Hollander (https://github.com/ThomasdenH), Wilco Bakker (https://github.com/WilcoBakker), wwwy3y3 (https://github.com/wwwy3y3), Zane Hannan AU (https://github.com/ZaneHannanAU), Samuel Ainsworth (https://github.com/samuela), Kyle Uehlein (https://github.com/kuehlein), Jordi Oliveras Rovira (https://github.com/j-oliveras), Thanik Bhongbhibhat (https://github.com/bhongy), Marcin Kopacz (https://github.com/chyzwar), Trivikram Kamat (https://github.com/trivikr), Minh Son Nguyen (https://github.com/nguymin4), Junxiao Shi (https://github.com/yoursunny), and Ilia Baryshnikov (https://github.com/qwelias). diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts new file mode 100644 index 00000000..12448133 --- /dev/null +++ b/node_modules/@types/node/assert.d.ts @@ -0,0 +1,48 @@ +declare module "assert" { + function internal(value: any, message?: string | Error): void; + namespace internal { + class AssertionError implements Error { + name: string; + message: string; + actual: any; + expected: any; + operator: string; + generatedMessage: boolean; + code: 'ERR_ASSERTION'; + + constructor(options?: { + message?: string; actual?: any; expected?: any; + operator?: string; stackStartFn?: Function + }); + } + + function fail(message?: string | Error): never; + /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ + function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never; + function ok(value: any, message?: string | Error): void; + function equal(actual: any, expected: any, message?: string | Error): void; + function notEqual(actual: any, expected: any, message?: string | Error): void; + function deepEqual(actual: any, expected: any, message?: string | Error): void; + function notDeepEqual(actual: any, expected: any, message?: string | Error): void; + function strictEqual(actual: any, expected: any, message?: string | Error): void; + function notStrictEqual(actual: any, expected: any, message?: string | Error): void; + function deepStrictEqual(actual: any, expected: any, message?: string | Error): void; + function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void; + + function throws(block: () => any, message?: string | Error): void; + function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void; + function doesNotThrow(block: () => any, message?: string | Error): void; + function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void; + + function ifError(value: any): void; + + function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; + function rejects(block: (() => Promise) | Promise, error: RegExp | Function | Object | Error, message?: string | Error): Promise; + function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise; + function doesNotReject(block: (() => Promise) | Promise, error: RegExp | Function, message?: string | Error): Promise; + + const strict: typeof internal; + } + + export = internal; +} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts new file mode 100644 index 00000000..cca992ec --- /dev/null +++ b/node_modules/@types/node/async_hooks.d.ts @@ -0,0 +1,132 @@ +/** + * Async Hooks module: https://nodejs.org/api/async_hooks.html + */ +declare module "async_hooks" { + /** + * Returns the asyncId of the current execution context. + */ + function executionAsyncId(): number; + + /** + * Returns the ID of the resource responsible for calling the callback that is currently being executed. + */ + function triggerAsyncId(): number; + + interface HookCallbacks { + /** + * Called when a class is constructed that has the possibility to emit an asynchronous event. + * @param asyncId a unique ID for the async resource + * @param type the type of the async resource + * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created + * @param resource reference to the resource representing the async operation, needs to be released during destroy + */ + init?(asyncId: number, type: string, triggerAsyncId: number, resource: Object): void; + + /** + * When an asynchronous operation is initiated or completes a callback is called to notify the user. + * The before callback is called just before said callback is executed. + * @param asyncId the unique identifier assigned to the resource about to execute the callback. + */ + before?(asyncId: number): void; + + /** + * Called immediately after the callback specified in before is completed. + * @param asyncId the unique identifier assigned to the resource which has executed the callback. + */ + after?(asyncId: number): void; + + /** + * Called when a promise has resolve() called. This may not be in the same execution id + * as the promise itself. + * @param asyncId the unique id for the promise that was resolve()d. + */ + promiseResolve?(asyncId: number): void; + + /** + * Called after the resource corresponding to asyncId is destroyed + * @param asyncId a unique ID for the async resource + */ + destroy?(asyncId: number): void; + } + + interface AsyncHook { + /** + * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. + */ + enable(): this; + + /** + * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. + */ + disable(): this; + } + + /** + * Registers functions to be called for different lifetime events of each async operation. + * @param options the callbacks to register + * @return an AsyncHooks instance used for disabling and enabling hooks + */ + function createHook(options: HookCallbacks): AsyncHook; + + interface AsyncResourceOptions { + /** + * The ID of the execution context that created this async event. + * Default: `executionAsyncId()` + */ + triggerAsyncId?: number; + + /** + * Disables automatic `emitDestroy` when the object is garbage collected. + * This usually does not need to be set (even if `emitDestroy` is called + * manually), unless the resource's `asyncId` is retrieved and the + * sensitive API's `emitDestroy` is called with it. + * Default: `false` + */ + requireManualDestroy?: boolean; + } + + /** + * The class AsyncResource was designed to be extended by the embedder's async resources. + * Using this users can easily trigger the lifetime events of their own resources. + */ + class AsyncResource { + /** + * AsyncResource() is meant to be extended. Instantiating a + * new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * async_hook.executionAsyncId() is used. + * @param type The type of async event. + * @param triggerAsyncId The ID of the execution context that created + * this async event (default: `executionAsyncId()`), or an + * AsyncResourceOptions object (since 9.3) + */ + constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions); + + /** + * Call the provided function with the provided arguments in the + * execution context of the async resource. This will establish the + * context, trigger the AsyncHooks before callbacks, call the function, + * trigger the AsyncHooks after callbacks, and then restore the original + * execution context. + * @param fn The function to call in the execution context of this + * async resource. + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result; + + /** + * Call AsyncHooks destroy callbacks. + */ + emitDestroy(): void; + + /** + * @return the unique ID assigned to this AsyncResource instance. + */ + asyncId(): number; + + /** + * @return the trigger ID for this AsyncResource instance. + */ + triggerAsyncId(): number; + } +} diff --git a/node_modules/@types/node/base.d.ts b/node_modules/@types/node/base.d.ts new file mode 100644 index 00000000..70983d95 --- /dev/null +++ b/node_modules/@types/node/base.d.ts @@ -0,0 +1,41 @@ +// base definnitions for all NodeJS modules that are not specific to any version of TypeScript +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts new file mode 100644 index 00000000..7eb1061b --- /dev/null +++ b/node_modules/@types/node/buffer.d.ts @@ -0,0 +1,22 @@ +declare module "buffer" { + export const INSPECT_MAX_BYTES: number; + export const kMaxLength: number; + export const kStringMaxLength: number; + export const constants: { + MAX_LENGTH: number; + MAX_STRING_LENGTH: number; + }; + const BuffType: typeof Buffer; + + export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary"; + + export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; + + export const SlowBuffer: { + /** @deprecated since v6.0.0, use Buffer.allocUnsafeSlow() */ + new(size: number): Buffer; + prototype: Buffer; + }; + + export { BuffType as Buffer }; +} diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts new file mode 100644 index 00000000..09eeba3b --- /dev/null +++ b/node_modules/@types/node/child_process.d.ts @@ -0,0 +1,478 @@ +declare module "child_process" { + import * as events from "events"; + import * as net from "net"; + import { Writable, Readable, Stream, Pipe } from "stream"; + + interface ChildProcess extends events.EventEmitter { + stdin: Writable | null; + stdout: Readable | null; + stderr: Readable | null; + readonly channel?: Pipe | null; + readonly stdio: [ + Writable | null, // stdin + Readable | null, // stdout + Readable | null, // stderr + Readable | Writable | null | undefined, // extra + Readable | Writable | null | undefined // extra + ]; + readonly killed: boolean; + readonly pid: number; + readonly connected: boolean; + kill(signal?: NodeJS.Signals | number): void; + send(message: any, callback?: (error: Error | null) => void): boolean; + send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error | null) => void): boolean; + send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error | null) => void): boolean; + disconnect(): void; + unref(): void; + ref(): void; + + /** + * events.EventEmitter + * 1. close + * 2. disconnect + * 3. error + * 4. exit + * 5. message + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + addListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close", code: number, signal: NodeJS.Signals): boolean; + emit(event: "disconnect"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean; + emit(event: "message", message: any, sendHandle: net.Socket | net.Server): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + on(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + once(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + } + + // return this object when stdio option is undefined or not specified + interface ChildProcessWithoutNullStreams extends ChildProcess { + stdin: Writable; + stdout: Readable; + stderr: Readable; + readonly stdio: [ + Writable, // stdin + Readable, // stdout + Readable, // stderr + Readable | Writable | null | undefined, // extra, no modification + Readable | Writable | null | undefined // extra, no modification + ]; + } + + // return this object when stdio option is a tuple of 3 + interface ChildProcessByStdio< + I extends null | Writable, + O extends null | Readable, + E extends null | Readable, + > extends ChildProcess { + stdin: I; + stdout: O; + stderr: E; + readonly stdio: [ + I, + O, + E, + Readable | Writable | null | undefined, // extra, no modification + Readable | Writable | null | undefined // extra, no modification + ]; + } + + interface MessageOptions { + keepOpen?: boolean; + } + + type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>; + + interface ProcessEnvOptions { + uid?: number; + gid?: number; + cwd?: string; + env?: NodeJS.ProcessEnv; + } + + interface CommonOptions extends ProcessEnvOptions { + /** + * @default true + */ + windowsHide?: boolean; + /** + * @default 0 + */ + timeout?: number; + } + + interface SpawnOptions extends CommonOptions { + argv0?: string; + stdio?: StdioOptions; + detached?: boolean; + shell?: boolean | string; + windowsVerbatimArguments?: boolean; + } + + interface SpawnOptionsWithoutStdio extends SpawnOptions { + stdio?: 'pipe' | Array; + } + + type StdioNull = 'inherit' | 'ignore' | Stream; + type StdioPipe = undefined | null | 'pipe'; + + interface SpawnOptionsWithStdioTuple< + Stdin extends StdioNull | StdioPipe, + Stdout extends StdioNull | StdioPipe, + Stderr extends StdioNull | StdioPipe, + > extends SpawnOptions { + stdio: [Stdin, Stdout, Stderr]; + } + + // overloads of spawn without 'args' + function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + + function spawn(command: string, options: SpawnOptions): ChildProcess; + + // overloads of spawn with 'args' + function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + + function spawn( + command: string, + args: ReadonlyArray, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: ReadonlyArray, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: ReadonlyArray, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: ReadonlyArray, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: ReadonlyArray, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: ReadonlyArray, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: ReadonlyArray, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: ReadonlyArray, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + + function spawn(command: string, args: ReadonlyArray, options: SpawnOptions): ChildProcess; + + interface ExecOptions extends CommonOptions { + shell?: string; + maxBuffer?: number; + killSignal?: NodeJS.Signals | number; + } + + interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding: BufferEncoding; + } + + interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: string | null; // specify `null`. + } + + interface ExecException extends Error { + cmd?: string; + killed?: boolean; + code?: number; + signal?: NodeJS.Signals; + } + + // no `options` definitely means stdout/stderr are `string`. + function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function exec( + command: string, + options: ({ encoding?: string | null } & ExecOptions) | undefined | null, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + + interface PromiseWithChild extends Promise { + child: ChildProcess; + } + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace exec { + function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; + function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + } + + interface ExecFileOptions extends CommonOptions { + maxBuffer?: number; + killSignal?: NodeJS.Signals | number; + windowsVerbatimArguments?: boolean; + shell?: boolean | string; + } + interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: 'buffer' | null; + } + interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { + encoding: string; + } + + function execFile(file: string): ChildProcess; + function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; + function execFile(file: string, args?: ReadonlyArray | null): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; + + // no `options` definitely means stdout/stderr are `string`. + function execFile(file: string, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void, + ): ChildProcess; + + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithStringEncoding, + callback: (error: Error | null, stdout: string, stderr: string) => void, + ): ChildProcess; + + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function execFile( + file: string, + options: ExecFileOptionsWithOtherEncoding, + callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithOtherEncoding, + callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function execFile(file: string, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function execFile( + file: string, + options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, + callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null, + ): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, + callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null, + ): ChildProcess; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace execFile { + function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, args: string[] | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; + function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + function __promisify__( + file: string, + args: string[] | undefined | null, + options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, + ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + } + + interface ForkOptions extends ProcessEnvOptions { + execPath?: string; + execArgv?: string[]; + silent?: boolean; + stdio?: StdioOptions; + detached?: boolean; + windowsVerbatimArguments?: boolean; + } + function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess; + + interface SpawnSyncOptions extends CommonOptions { + argv0?: string; // Not specified in the docs + input?: string | NodeJS.ArrayBufferView; + stdio?: StdioOptions; + killSignal?: NodeJS.Signals | number; + maxBuffer?: number; + encoding?: string; + shell?: boolean | string; + windowsVerbatimArguments?: boolean; + } + interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding: string; // specify `null`. + } + interface SpawnSyncReturns { + pid: number; + output: string[]; + stdout: T; + stderr: T; + status: number | null; + signal: NodeJS.Signals | null; + error?: Error; + } + function spawnSync(command: string): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptions): SpawnSyncReturns; + + interface ExecSyncOptions extends CommonOptions { + input?: string | Uint8Array; + stdio?: StdioOptions; + shell?: string; + killSignal?: NodeJS.Signals | number; + maxBuffer?: number; + encoding?: string; + } + interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding: string; // specify `null`. + } + function execSync(command: string): Buffer; + function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; + function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; + function execSync(command: string, options?: ExecSyncOptions): Buffer; + + interface ExecFileSyncOptions extends CommonOptions { + input?: string | NodeJS.ArrayBufferView; + stdio?: StdioOptions; + killSignal?: NodeJS.Signals | number; + maxBuffer?: number; + encoding?: string; + shell?: boolean | string; + } + interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding: string; // specify `null`. + } + function execFileSync(command: string): Buffer; + function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; + function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): Buffer; +} diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts new file mode 100644 index 00000000..43340ff8 --- /dev/null +++ b/node_modules/@types/node/cluster.d.ts @@ -0,0 +1,260 @@ +declare module "cluster" { + import * as child from "child_process"; + import * as events from "events"; + import * as net from "net"; + + // interfaces + interface ClusterSettings { + execArgv?: string[]; // default: process.execArgv + exec?: string; + args?: string[]; + silent?: boolean; + stdio?: any[]; + uid?: number; + gid?: number; + inspectPort?: number | (() => number); + } + + interface Address { + address: string; + port: number; + addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" + } + + class Worker extends events.EventEmitter { + id: number; + process: child.ChildProcess; + send(message: any, sendHandle?: any, callback?: (error: Error | null) => void): boolean; + kill(signal?: string): void; + destroy(signal?: string): void; + disconnect(): void; + isConnected(): boolean; + isDead(): boolean; + exitedAfterDisconnect: boolean; + + /** + * events.EventEmitter + * 1. disconnect + * 2. error + * 3. exit + * 4. listening + * 5. message + * 6. online + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + addListener(event: "exit", listener: (code: number, signal: string) => void): this; + addListener(event: "listening", listener: (address: Address) => void): this; + addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "disconnect"): boolean; + emit(event: "error", error: Error): boolean; + emit(event: "exit", code: number, signal: string): boolean; + emit(event: "listening", address: Address): boolean; + emit(event: "message", message: any, handle: net.Socket | net.Server): boolean; + emit(event: "online"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + on(event: "exit", listener: (code: number, signal: string) => void): this; + on(event: "listening", listener: (address: Address) => void): this; + on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + once(event: "exit", listener: (code: number, signal: string) => void): this; + once(event: "listening", listener: (address: Address) => void): this; + once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependListener(event: "listening", listener: (address: Address) => void): this; + prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "listening", listener: (address: Address) => void): this; + prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "online", listener: () => void): this; + } + + interface Cluster extends events.EventEmitter { + Worker: Worker; + disconnect(callback?: () => void): void; + fork(env?: any): Worker; + isMaster: boolean; + isWorker: boolean; + // TODO: cluster.schedulingPolicy + settings: ClusterSettings; + setupMaster(settings?: ClusterSettings): void; + worker?: Worker; + workers?: { + [index: string]: Worker | undefined + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "disconnect", listener: (worker: Worker) => void): this; + addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + addListener(event: "fork", listener: (worker: Worker) => void): this; + addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: (worker: Worker) => void): this; + addListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "disconnect", worker: Worker): boolean; + emit(event: "exit", worker: Worker, code: number, signal: string): boolean; + emit(event: "fork", worker: Worker): boolean; + emit(event: "listening", worker: Worker, address: Address): boolean; + emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + emit(event: "online", worker: Worker): boolean; + emit(event: "setup", settings: ClusterSettings): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "disconnect", listener: (worker: Worker) => void): this; + on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + on(event: "fork", listener: (worker: Worker) => void): this; + on(event: "listening", listener: (worker: Worker, address: Address) => void): this; + on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: (worker: Worker) => void): this; + on(event: "setup", listener: (settings: ClusterSettings) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "disconnect", listener: (worker: Worker) => void): this; + once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + once(event: "fork", listener: (worker: Worker) => void): this; + once(event: "listening", listener: (worker: Worker, address: Address) => void): this; + once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: (worker: Worker) => void): this; + once(event: "setup", listener: (settings: ClusterSettings) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependListener(event: "fork", listener: (worker: Worker) => void): this; + prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: (worker: Worker) => void): this; + prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; + prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; + prependOnceListener(event: "online", listener: (worker: Worker) => void): this; + prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + } + + function disconnect(callback?: () => void): void; + function fork(env?: any): Worker; + const isMaster: boolean; + const isWorker: boolean; + // TODO: cluster.schedulingPolicy + const settings: ClusterSettings; + function setupMaster(settings?: ClusterSettings): void; + const worker: Worker; + const workers: { + [index: string]: Worker | undefined + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + function addListener(event: string, listener: (...args: any[]) => void): Cluster; + function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; + function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + // the handle is a net.Socket or net.Server object, or undefined. + function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; + function addListener(event: "online", listener: (worker: Worker) => void): Cluster; + function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function emit(event: string | symbol, ...args: any[]): boolean; + function emit(event: "disconnect", worker: Worker): boolean; + function emit(event: "exit", worker: Worker, code: number, signal: string): boolean; + function emit(event: "fork", worker: Worker): boolean; + function emit(event: "listening", worker: Worker, address: Address): boolean; + function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + function emit(event: "online", worker: Worker): boolean; + function emit(event: "setup", settings: ClusterSettings): boolean; + + function on(event: string, listener: (...args: any[]) => void): Cluster; + function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function on(event: "fork", listener: (worker: Worker) => void): Cluster; + function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + function on(event: "online", listener: (worker: Worker) => void): Cluster; + function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function once(event: string, listener: (...args: any[]) => void): Cluster; + function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function once(event: "fork", listener: (worker: Worker) => void): Cluster; + function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + function once(event: "online", listener: (worker: Worker) => void): Cluster; + function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function removeListener(event: string, listener: (...args: any[]) => void): Cluster; + function removeAllListeners(event?: string): Cluster; + function setMaxListeners(n: number): Cluster; + function getMaxListeners(): number; + function listeners(event: string): Function[]; + function listenerCount(type: string): number; + + function prependListener(event: string, listener: (...args: any[]) => void): Cluster; + function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; + function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + // the handle is a net.Socket or net.Server object, or undefined. + function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; + function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; + function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster; + function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; + function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + // the handle is a net.Socket or net.Server object, or undefined. + function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; + function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; + function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function eventNames(): string[]; +} diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts new file mode 100644 index 00000000..d30d13f8 --- /dev/null +++ b/node_modules/@types/node/console.d.ts @@ -0,0 +1,3 @@ +declare module "console" { + export = console; +} diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts new file mode 100644 index 00000000..ebd463b2 --- /dev/null +++ b/node_modules/@types/node/constants.d.ts @@ -0,0 +1,448 @@ +/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ +declare module "constants" { + /** @deprecated since v6.3.0 - use `os.constants.errno.E2BIG` instead. */ + const E2BIG: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EACCES` instead. */ + const EACCES: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EADDRINUSE` instead. */ + const EADDRINUSE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EADDRNOTAVAIL` instead. */ + const EADDRNOTAVAIL: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EAFNOSUPPORT` instead. */ + const EAFNOSUPPORT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EAGAIN` instead. */ + const EAGAIN: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EALREADY` instead. */ + const EALREADY: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EBADF` instead. */ + const EBADF: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EBADMSG` instead. */ + const EBADMSG: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EBUSY` instead. */ + const EBUSY: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ECANCELED` instead. */ + const ECANCELED: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ECHILD` instead. */ + const ECHILD: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ECONNABORTED` instead. */ + const ECONNABORTED: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ECONNREFUSED` instead. */ + const ECONNREFUSED: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ECONNRESET` instead. */ + const ECONNRESET: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EDEADLK` instead. */ + const EDEADLK: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EDESTADDRREQ` instead. */ + const EDESTADDRREQ: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EDOM` instead. */ + const EDOM: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EEXIST` instead. */ + const EEXIST: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EFAULT` instead. */ + const EFAULT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EFBIG` instead. */ + const EFBIG: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EHOSTUNREACH` instead. */ + const EHOSTUNREACH: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EIDRM` instead. */ + const EIDRM: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EILSEQ` instead. */ + const EILSEQ: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EINPROGRESS` instead. */ + const EINPROGRESS: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EINTR` instead. */ + const EINTR: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EINVAL` instead. */ + const EINVAL: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EIO` instead. */ + const EIO: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EISCONN` instead. */ + const EISCONN: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EISDIR` instead. */ + const EISDIR: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ELOOP` instead. */ + const ELOOP: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EMFILE` instead. */ + const EMFILE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EMLINK` instead. */ + const EMLINK: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EMSGSIZE` instead. */ + const EMSGSIZE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENAMETOOLONG` instead. */ + const ENAMETOOLONG: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENETDOWN` instead. */ + const ENETDOWN: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENETRESET` instead. */ + const ENETRESET: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENETUNREACH` instead. */ + const ENETUNREACH: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENFILE` instead. */ + const ENFILE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOBUFS` instead. */ + const ENOBUFS: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENODATA` instead. */ + const ENODATA: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENODEV` instead. */ + const ENODEV: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOENT` instead. */ + const ENOENT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOEXEC` instead. */ + const ENOEXEC: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOLCK` instead. */ + const ENOLCK: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOLINK` instead. */ + const ENOLINK: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOMEM` instead. */ + const ENOMEM: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOMSG` instead. */ + const ENOMSG: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOPROTOOPT` instead. */ + const ENOPROTOOPT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOSPC` instead. */ + const ENOSPC: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOSR` instead. */ + const ENOSR: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOSTR` instead. */ + const ENOSTR: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOSYS` instead. */ + const ENOSYS: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTCONN` instead. */ + const ENOTCONN: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTDIR` instead. */ + const ENOTDIR: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTEMPTY` instead. */ + const ENOTEMPTY: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTSOCK` instead. */ + const ENOTSOCK: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTSUP` instead. */ + const ENOTSUP: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTTY` instead. */ + const ENOTTY: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ENXIO` instead. */ + const ENXIO: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EOPNOTSUPP` instead. */ + const EOPNOTSUPP: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EOVERFLOW` instead. */ + const EOVERFLOW: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EPERM` instead. */ + const EPERM: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EPIPE` instead. */ + const EPIPE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EPROTO` instead. */ + const EPROTO: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EPROTONOSUPPORT` instead. */ + const EPROTONOSUPPORT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EPROTOTYPE` instead. */ + const EPROTOTYPE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ERANGE` instead. */ + const ERANGE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EROFS` instead. */ + const EROFS: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ESPIPE` instead. */ + const ESPIPE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ESRCH` instead. */ + const ESRCH: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ETIME` instead. */ + const ETIME: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ETIMEDOUT` instead. */ + const ETIMEDOUT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.ETXTBSY` instead. */ + const ETXTBSY: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EWOULDBLOCK` instead. */ + const EWOULDBLOCK: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.EXDEV` instead. */ + const EXDEV: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINTR` instead. */ + const WSAEINTR: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEBADF` instead. */ + const WSAEBADF: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEACCES` instead. */ + const WSAEACCES: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEFAULT` instead. */ + const WSAEFAULT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINVAL` instead. */ + const WSAEINVAL: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEMFILE` instead. */ + const WSAEMFILE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEWOULDBLOCK` instead. */ + const WSAEWOULDBLOCK: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINPROGRESS` instead. */ + const WSAEINPROGRESS: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEALREADY` instead. */ + const WSAEALREADY: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOTSOCK` instead. */ + const WSAENOTSOCK: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEDESTADDRREQ` instead. */ + const WSAEDESTADDRREQ: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEMSGSIZE` instead. */ + const WSAEMSGSIZE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROTOTYPE` instead. */ + const WSAEPROTOTYPE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOPROTOOPT` instead. */ + const WSAENOPROTOOPT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROTONOSUPPORT` instead. */ + const WSAEPROTONOSUPPORT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAESOCKTNOSUPPORT` instead. */ + const WSAESOCKTNOSUPPORT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEOPNOTSUPP` instead. */ + const WSAEOPNOTSUPP: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPFNOSUPPORT` instead. */ + const WSAEPFNOSUPPORT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEAFNOSUPPORT` instead. */ + const WSAEAFNOSUPPORT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEADDRINUSE` instead. */ + const WSAEADDRINUSE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEADDRNOTAVAIL` instead. */ + const WSAEADDRNOTAVAIL: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENETDOWN` instead. */ + const WSAENETDOWN: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENETUNREACH` instead. */ + const WSAENETUNREACH: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENETRESET` instead. */ + const WSAENETRESET: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAECONNABORTED` instead. */ + const WSAECONNABORTED: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAECONNRESET` instead. */ + const WSAECONNRESET: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOBUFS` instead. */ + const WSAENOBUFS: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEISCONN` instead. */ + const WSAEISCONN: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOTCONN` instead. */ + const WSAENOTCONN: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAESHUTDOWN` instead. */ + const WSAESHUTDOWN: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAETOOMANYREFS` instead. */ + const WSAETOOMANYREFS: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAETIMEDOUT` instead. */ + const WSAETIMEDOUT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAECONNREFUSED` instead. */ + const WSAECONNREFUSED: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAELOOP` instead. */ + const WSAELOOP: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENAMETOOLONG` instead. */ + const WSAENAMETOOLONG: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEHOSTDOWN` instead. */ + const WSAEHOSTDOWN: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEHOSTUNREACH` instead. */ + const WSAEHOSTUNREACH: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOTEMPTY` instead. */ + const WSAENOTEMPTY: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROCLIM` instead. */ + const WSAEPROCLIM: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEUSERS` instead. */ + const WSAEUSERS: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEDQUOT` instead. */ + const WSAEDQUOT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAESTALE` instead. */ + const WSAESTALE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEREMOTE` instead. */ + const WSAEREMOTE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSASYSNOTREADY` instead. */ + const WSASYSNOTREADY: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAVERNOTSUPPORTED` instead. */ + const WSAVERNOTSUPPORTED: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSANOTINITIALISED` instead. */ + const WSANOTINITIALISED: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEDISCON` instead. */ + const WSAEDISCON: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOMORE` instead. */ + const WSAENOMORE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAECANCELLED` instead. */ + const WSAECANCELLED: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINVALIDPROCTABLE` instead. */ + const WSAEINVALIDPROCTABLE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINVALIDPROVIDER` instead. */ + const WSAEINVALIDPROVIDER: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROVIDERFAILEDINIT` instead. */ + const WSAEPROVIDERFAILEDINIT: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSASYSCALLFAILURE` instead. */ + const WSASYSCALLFAILURE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSASERVICE_NOT_FOUND` instead. */ + const WSASERVICE_NOT_FOUND: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSATYPE_NOT_FOUND` instead. */ + const WSATYPE_NOT_FOUND: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSA_E_NO_MORE` instead. */ + const WSA_E_NO_MORE: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSA_E_CANCELLED` instead. */ + const WSA_E_CANCELLED: number; + /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEREFUSED` instead. */ + const WSAEREFUSED: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGHUP` instead. */ + const SIGHUP: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGINT` instead. */ + const SIGINT: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGILL` instead. */ + const SIGILL: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGABRT` instead. */ + const SIGABRT: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGFPE` instead. */ + const SIGFPE: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGKILL` instead. */ + const SIGKILL: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGSEGV` instead. */ + const SIGSEGV: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGTERM` instead. */ + const SIGTERM: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGBREAK` instead. */ + const SIGBREAK: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGWINCH` instead. */ + const SIGWINCH: number; + const SSL_OP_ALL: number; + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + const SSL_OP_CISCO_ANYCONNECT: number; + const SSL_OP_COOKIE_EXCHANGE: number; + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + const SSL_OP_EPHEMERAL_RSA: number; + const SSL_OP_LEGACY_SERVER_CONNECT: number; + const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + const SSL_OP_MICROSOFT_SESS_ID_BUG: number; + const SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + const SSL_OP_NETSCAPE_CA_DN_BUG: number; + const SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_QUERY_MTU: number; + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + const SSL_OP_NO_SSLv2: number; + const SSL_OP_NO_SSLv3: number; + const SSL_OP_NO_TICKET: number; + const SSL_OP_NO_TLSv1: number; + const SSL_OP_NO_TLSv1_1: number; + const SSL_OP_NO_TLSv1_2: number; + const SSL_OP_PKCS1_CHECK_1: number; + const SSL_OP_PKCS1_CHECK_2: number; + const SSL_OP_SINGLE_DH_USE: number; + const SSL_OP_SINGLE_ECDH_USE: number; + const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + const SSL_OP_TLS_BLOCK_PADDING_BUG: number; + const SSL_OP_TLS_D5_BUG: number; + const SSL_OP_TLS_ROLLBACK_BUG: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_ECDH: number; + const ENGINE_METHOD_ECDSA: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_STORE: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + const RSA_PKCS1_PADDING: number; + const RSA_SSLV23_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + const O_RDONLY: number; + const O_WRONLY: number; + const O_RDWR: number; + const S_IFMT: number; + const S_IFREG: number; + const S_IFDIR: number; + const S_IFCHR: number; + const S_IFBLK: number; + const S_IFIFO: number; + const S_IFSOCK: number; + const S_IRWXU: number; + const S_IRUSR: number; + const S_IWUSR: number; + const S_IXUSR: number; + const S_IRWXG: number; + const S_IRGRP: number; + const S_IWGRP: number; + const S_IXGRP: number; + const S_IRWXO: number; + const S_IROTH: number; + const S_IWOTH: number; + const S_IXOTH: number; + const S_IFLNK: number; + const O_CREAT: number; + const O_EXCL: number; + const O_NOCTTY: number; + const O_DIRECTORY: number; + const O_NOATIME: number; + const O_NOFOLLOW: number; + const O_SYNC: number; + const O_DSYNC: number; + const O_SYMLINK: number; + const O_DIRECT: number; + const O_NONBLOCK: number; + const O_TRUNC: number; + const O_APPEND: number; + const F_OK: number; + const R_OK: number; + const W_OK: number; + const X_OK: number; + const COPYFILE_EXCL: number; + const COPYFILE_FICLONE: number; + const COPYFILE_FICLONE_FORCE: number; + const UV_UDP_REUSEADDR: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGQUIT` instead. */ + const SIGQUIT: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGTRAP` instead. */ + const SIGTRAP: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGIOT` instead. */ + const SIGIOT: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGBUS` instead. */ + const SIGBUS: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGUSR1` instead. */ + const SIGUSR1: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGUSR2` instead. */ + const SIGUSR2: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGPIPE` instead. */ + const SIGPIPE: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGALRM` instead. */ + const SIGALRM: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGCHLD` instead. */ + const SIGCHLD: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGSTKFLT` instead. */ + const SIGSTKFLT: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGCONT` instead. */ + const SIGCONT: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGSTOP` instead. */ + const SIGSTOP: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGTSTP` instead. */ + const SIGTSTP: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGTTIN` instead. */ + const SIGTTIN: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGTTOU` instead. */ + const SIGTTOU: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGURG` instead. */ + const SIGURG: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGXCPU` instead. */ + const SIGXCPU: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGXFSZ` instead. */ + const SIGXFSZ: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGVTALRM` instead. */ + const SIGVTALRM: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGPROF` instead. */ + const SIGPROF: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGIO` instead. */ + const SIGIO: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGPOLL` instead. */ + const SIGPOLL: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGPWR` instead. */ + const SIGPWR: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGSYS` instead. */ + const SIGSYS: number; + /** @deprecated since v6.3.0 - use `os.constants.signals.SIGUNUSED` instead. */ + const SIGUNUSED: number; + const defaultCoreCipherList: string; + const defaultCipherList: string; + const ENGINE_METHOD_RSA: number; + const ALPN_ENABLED: number; +} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts new file mode 100644 index 00000000..b7ecb7ff --- /dev/null +++ b/node_modules/@types/node/crypto.d.ts @@ -0,0 +1,614 @@ +declare module "crypto" { + import * as stream from "stream"; + + interface Certificate { + exportChallenge(spkac: BinaryLike): Buffer; + exportPublicKey(spkac: BinaryLike): Buffer; + verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; + } + const Certificate: { + new(): Certificate; + (): Certificate; + }; + + namespace constants { // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants + const OPENSSL_VERSION_NUMBER: number; + + /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ + const SSL_OP_ALL: number; + /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */ + const SSL_OP_CISCO_ANYCONNECT: number; + /** Instructs OpenSSL to turn on cookie exchange. */ + const SSL_OP_COOKIE_EXCHANGE: number; + /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */ + const SSL_OP_EPHEMERAL_RSA: number; + /** Allows initial connection to servers that do not support RI. */ + const SSL_OP_LEGACY_SERVER_CONNECT: number; + const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + const SSL_OP_MICROSOFT_SESS_ID_BUG: number; + /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */ + const SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + const SSL_OP_NETSCAPE_CA_DN_BUG: number; + const SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + /** Instructs OpenSSL to disable support for SSL/TLS compression. */ + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_QUERY_MTU: number; + /** Instructs OpenSSL to always start a new session when performing renegotiation. */ + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + const SSL_OP_NO_SSLv2: number; + const SSL_OP_NO_SSLv3: number; + const SSL_OP_NO_TICKET: number; + const SSL_OP_NO_TLSv1: number; + const SSL_OP_NO_TLSv1_1: number; + const SSL_OP_NO_TLSv1_2: number; + const SSL_OP_PKCS1_CHECK_1: number; + const SSL_OP_PKCS1_CHECK_2: number; + /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */ + const SSL_OP_SINGLE_DH_USE: number; + /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */ + const SSL_OP_SINGLE_ECDH_USE: number; + const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + const SSL_OP_TLS_BLOCK_PADDING_BUG: number; + const SSL_OP_TLS_D5_BUG: number; + /** Instructs OpenSSL to disable version rollback attack detection. */ + const SSL_OP_TLS_ROLLBACK_BUG: number; + + const ENGINE_METHOD_RSA: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_EC: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + + const ALPN_ENABLED: number; + + const RSA_PKCS1_PADDING: number; + const RSA_SSLV23_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ + const RSA_PSS_SALTLEN_DIGEST: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ + const RSA_PSS_SALTLEN_MAX_SIGN: number; + /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ + const RSA_PSS_SALTLEN_AUTO: number; + + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + + /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ + const defaultCoreCipherList: string; + /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ + const defaultCipherList: string; + } + + interface HashOptions extends stream.TransformOptions { + /** + * For XOF hash functions such as `shake256`, the + * outputLength option can be used to specify the desired output length in bytes. + */ + outputLength?: number; + } + + /** @deprecated since v10.0.0 */ + const fips: boolean; + + function createHash(algorithm: string, options?: HashOptions): Hash; + function createHmac(algorithm: string, key: BinaryLike, options?: stream.TransformOptions): Hmac; + + type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1"; + type HexBase64Latin1Encoding = "latin1" | "hex" | "base64"; + type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary"; + type HexBase64BinaryEncoding = "binary" | "base64" | "hex"; + type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; + + class Hash extends stream.Transform { + private constructor(); + update(data: BinaryLike): Hash; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + class Hmac extends stream.Transform { + private constructor(); + update(data: BinaryLike): Hmac; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + + type KeyObjectType = 'secret' | 'public' | 'private'; + + interface KeyExportOptions { + type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1'; + format: T; + cipher?: string; + passphrase?: string | Buffer; + } + + class KeyObject { + private constructor(); + asymmetricKeyType?: KeyType; + /** + * For asymmetric keys, this property represents the size of the embedded key in + * bytes. This property is `undefined` for symmetric keys. + */ + asymmetricKeySize?: number; + export(options: KeyExportOptions<'pem'>): string | Buffer; + export(options?: KeyExportOptions<'der'>): Buffer; + symmetricSize?: number; + type: KeyObjectType; + } + + type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm'; + type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm'; + + type BinaryLike = string | NodeJS.ArrayBufferView; + + type CipherKey = BinaryLike | KeyObject; + + interface CipherCCMOptions extends stream.TransformOptions { + authTagLength: number; + } + interface CipherGCMOptions extends stream.TransformOptions { + authTagLength?: number; + } + /** @deprecated since v10.0.0 use createCipheriv() */ + function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM; + /** @deprecated since v10.0.0 use createCipheriv() */ + function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM; + /** @deprecated since v10.0.0 use createCipheriv() */ + function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher; + + function createCipheriv( + algorithm: CipherCCMTypes, + key: CipherKey, + iv: BinaryLike | null, + options: CipherCCMOptions + ): CipherCCM; + function createCipheriv( + algorithm: CipherGCMTypes, + key: CipherKey, + iv: BinaryLike | null, + options?: CipherGCMOptions + ): CipherGCM; + function createCipheriv( + algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions + ): Cipher; + + class Cipher extends stream.Transform { + private constructor(); + update(data: BinaryLike): Buffer; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; + update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding | undefined, output_encoding: HexBase64BinaryEncoding): string; + final(): Buffer; + final(output_encoding: string): string; + setAutoPadding(auto_padding?: boolean): this; + // getAuthTag(): Buffer; + // setAAD(buffer: Buffer): this; // docs only say buffer + } + interface CipherCCM extends Cipher { + setAAD(buffer: Buffer, options: { plaintextLength: number }): this; + getAuthTag(): Buffer; + } + interface CipherGCM extends Cipher { + setAAD(buffer: Buffer, options?: { plaintextLength: number }): this; + getAuthTag(): Buffer; + } + /** @deprecated since v10.0.0 use createDecipheriv() */ + function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM; + /** @deprecated since v10.0.0 use createDecipheriv() */ + function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM; + /** @deprecated since v10.0.0 use createDecipheriv() */ + function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher; + + function createDecipheriv( + algorithm: CipherCCMTypes, + key: BinaryLike, + iv: BinaryLike | null, + options: CipherCCMOptions, + ): DecipherCCM; + function createDecipheriv( + algorithm: CipherGCMTypes, + key: BinaryLike, + iv: BinaryLike | null, + options?: CipherGCMOptions, + ): DecipherGCM; + function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher; + + class Decipher extends stream.Transform { + private constructor(); + update(data: NodeJS.ArrayBufferView): Buffer; + update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; + update(data: NodeJS.ArrayBufferView, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string; + update(data: string, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string; + final(): Buffer; + final(output_encoding: string): string; + setAutoPadding(auto_padding?: boolean): this; + // setAuthTag(tag: NodeJS.ArrayBufferView): this; + // setAAD(buffer: NodeJS.ArrayBufferView): this; + } + interface DecipherCCM extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this; + } + interface DecipherGCM extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this; + } + + interface PrivateKeyInput { + key: string | Buffer; + format?: KeyFormat; + type?: 'pkcs1' | 'pkcs8' | 'sec1'; + passphrase?: string | Buffer; + } + + interface PublicKeyInput { + key: string | Buffer; + format?: KeyFormat; + type?: 'pkcs1' | 'spki'; + } + + function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject; + function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject; + function createSecretKey(key: Buffer): KeyObject; + + function createSign(algorithm: string, options?: stream.WritableOptions): Signer; + + interface SigningOptions { + /** + * @See crypto.constants.RSA_PKCS1_PADDING + */ + padding?: number; + saltLength?: number; + } + + interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions { + } + + type KeyLike = string | Buffer | KeyObject; + + class Signer extends stream.Writable { + private constructor(); + + update(data: BinaryLike): Signer; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer; + sign(private_key: SignPrivateKeyInput | KeyLike): Buffer; + sign(private_key: SignPrivateKeyInput | KeyLike, output_format: HexBase64Latin1Encoding): string; + } + + function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; + class Verify extends stream.Writable { + private constructor(); + + update(data: BinaryLike): Verify; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify; + verify(object: Object | KeyLike, signature: NodeJS.ArrayBufferView): boolean; + verify(object: Object | KeyLike, signature: string, signature_format?: HexBase64Latin1Encoding): boolean; + // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format + // The signature field accepts a TypedArray type, but it is only available starting ES2017 + } + function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; + function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; + class DiffieHellman { + private constructor(); + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrime(): Buffer; + getPrime(encoding: HexBase64Latin1Encoding): string; + getGenerator(): Buffer; + getGenerator(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + setPublicKey(public_key: NodeJS.ArrayBufferView): void; + setPublicKey(public_key: string, encoding: string): void; + setPrivateKey(private_key: NodeJS.ArrayBufferView): void; + setPrivateKey(private_key: string, encoding: string): void; + verifyError: number; + } + function getDiffieHellman(group_name: string): DiffieHellman; + function pbkdf2( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + callback: (err: Error | null, derivedKey: Buffer) => any, + ): void; + function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer; + + function randomBytes(size: number): Buffer; + function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + function pseudoRandomBytes(size: number): Buffer; + function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + + function randomFillSync(buffer: T, offset?: number, size?: number): T; + function randomFill(buffer: T, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void; + + interface ScryptOptions { + N?: number; + r?: number; + p?: number; + maxmem?: number; + } + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void, + ): void; + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + options: ScryptOptions, + callback: (err: Error | null, derivedKey: Buffer) => void, + ): void; + function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer; + + interface RsaPublicKey { + key: KeyLike; + padding?: number; + } + interface RsaPrivateKey { + key: KeyLike; + passphrase?: string; + /** + * @default 'sha1' + */ + oaepHash?: string; + oaepLabel?: NodeJS.TypedArray; + padding?: number; + } + function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + function getCiphers(): string[]; + function getCurves(): string[]; + function getHashes(): string[]; + class ECDH { + private constructor(); + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding?: HexBase64Latin1Encoding, + outputEncoding?: "latin1" | "hex" | "base64", + format?: "uncompressed" | "compressed" | "hybrid", + ): Buffer | string; + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string; + computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string; + setPrivateKey(private_key: NodeJS.ArrayBufferView): void; + setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; + } + function createECDH(curve_name: string): ECDH; + function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean; + /** @deprecated since v10.0.0 */ + const DEFAULT_ENCODING: string; + + type KeyType = 'rsa' | 'dsa' | 'ec'; + type KeyFormat = 'pem' | 'der'; + + interface BasePrivateKeyEncodingOptions { + format: T; + cipher?: string; + passphrase?: string; + } + + interface KeyPairKeyObjectResult { + publicKey: KeyObject; + privateKey: KeyObject; + } + + interface ECKeyPairKeyObjectOptions { + /** + * Name of the curve to use. + */ + namedCurve: string; + } + + interface RSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + + /** + * @default 0x10001 + */ + publicExponent?: number; + } + + interface DSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + + /** + * Size of q in bits + */ + divisorLength: number; + } + + interface RSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * @default 0x10001 + */ + publicExponent?: number; + + publicKeyEncoding: { + type: 'pkcs1' | 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs1' | 'pkcs8'; + }; + } + + interface DSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Size of q in bits + */ + divisorLength: number; + + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + + interface ECKeyPairOptions { + /** + * Name of the curve to use. + */ + namedCurve: string; + + publicKeyEncoding: { + type: 'pkcs1' | 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'sec1' | 'pkcs8'; + }; + } + + interface KeyPairSyncResult { + publicKey: T1; + privateKey: T2; + } + + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + + namespace generateKeyPair { + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; + function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise; + + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; + function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise; + + function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; + function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; + function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; + function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; + function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise; + } + + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type (especially Ed25519 and Ed448). + * + * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been + * passed to [`crypto.createPrivateKey()`][]. + */ + function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignPrivateKeyInput): Buffer; + + interface VerifyKeyWithOptions extends KeyObject, SigningOptions { + } + + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type (especially Ed25519 and Ed448). + * + * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been + * passed to [`crypto.createPublicKey()`][]. + */ + function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyWithOptions, signature: NodeJS.ArrayBufferView): Buffer; +} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts new file mode 100644 index 00000000..f04e9a22 --- /dev/null +++ b/node_modules/@types/node/dgram.d.ts @@ -0,0 +1,118 @@ +declare module "dgram" { + import { AddressInfo } from "net"; + import * as dns from "dns"; + import * as events from "events"; + + interface RemoteInfo { + address: string; + family: 'IPv4' | 'IPv6'; + port: number; + size: number; + } + + interface BindOptions { + port?: number; + address?: string; + exclusive?: boolean; + fd?: number; + } + + type SocketType = "udp4" | "udp6"; + + interface SocketOptions { + type: SocketType; + reuseAddr?: boolean; + /** + * @default false + */ + ipv6Only?: boolean; + recvBufferSize?: number; + sendBufferSize?: number; + lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + } + + function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + + class Socket extends events.EventEmitter { + addMembership(multicastAddress: string, multicastInterface?: string): void; + address(): AddressInfo; + bind(port?: number, address?: string, callback?: () => void): void; + bind(port?: number, callback?: () => void): void; + bind(callback?: () => void): void; + bind(options: BindOptions, callback?: () => void): void; + close(callback?: () => void): void; + connect(port: number, address?: string, callback?: () => void): void; + connect(port: number, callback: () => void): void; + disconnect(): void; + dropMembership(multicastAddress: string, multicastInterface?: string): void; + getRecvBufferSize(): number; + getSendBufferSize(): number; + ref(): this; + remoteAddress(): AddressInfo; + send(msg: string | Uint8Array | any[], port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array | any[], port?: number, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array | any[], callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void; + setBroadcast(flag: boolean): void; + setMulticastInterface(multicastInterface: string): void; + setMulticastLoopback(flag: boolean): void; + setMulticastTTL(ttl: number): void; + setRecvBufferSize(size: number): void; + setSendBufferSize(size: number): void; + setTTL(ttl: number): void; + unref(): this; + + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. error + * 4. listening + * 5. message + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connect", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "connect"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "connect", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "connect", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connect", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connect", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + } +} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts new file mode 100644 index 00000000..d2b05056 --- /dev/null +++ b/node_modules/@types/node/dns.d.ts @@ -0,0 +1,366 @@ +declare module "dns" { + // Supported getaddrinfo flags. + const ADDRCONFIG: number; + const V4MAPPED: number; + + interface LookupOptions { + family?: number; + hints?: number; + all?: boolean; + verbatim?: boolean; + } + + interface LookupOneOptions extends LookupOptions { + all?: false; + } + + interface LookupAllOptions extends LookupOptions { + all: true; + } + + interface LookupAddress { + address: string; + family: number; + } + + function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void; + function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void; + function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lookup { + function __promisify__(hostname: string, options: LookupAllOptions): Promise; + function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; + function __promisify__(hostname: string, options: LookupOptions): Promise; + } + + function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void; + + namespace lookupService { + function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>; + } + + interface ResolveOptions { + ttl: boolean; + } + + interface ResolveWithTtlOptions extends ResolveOptions { + ttl: true; + } + + interface RecordWithTtl { + address: string; + ttl: number; + } + + /** @deprecated Use AnyARecord or AnyAaaaRecord instead. */ + type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; + + interface AnyARecord extends RecordWithTtl { + type: "A"; + } + + interface AnyAaaaRecord extends RecordWithTtl { + type: "AAAA"; + } + + interface MxRecord { + priority: number; + exchange: string; + } + + interface AnyMxRecord extends MxRecord { + type: "MX"; + } + + interface NaptrRecord { + flags: string; + service: string; + regexp: string; + replacement: string; + order: number; + preference: number; + } + + interface AnyNaptrRecord extends NaptrRecord { + type: "NAPTR"; + } + + interface SoaRecord { + nsname: string; + hostmaster: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minttl: number; + } + + interface AnySoaRecord extends SoaRecord { + type: "SOA"; + } + + interface SrvRecord { + priority: number; + weight: number; + port: number; + name: string; + } + + interface AnySrvRecord extends SrvRecord { + type: "SRV"; + } + + interface AnyTxtRecord { + type: "TXT"; + entries: string[]; + } + + interface AnyNsRecord { + type: "NS"; + value: string; + } + + interface AnyPtrRecord { + type: "PTR"; + value: string; + } + + interface AnyCnameRecord { + type: "CNAME"; + value: string; + } + + type AnyRecord = AnyARecord | + AnyAaaaRecord | + AnyCnameRecord | + AnyMxRecord | + AnyNaptrRecord | + AnyNsRecord | + AnyPtrRecord | + AnySoaRecord | + AnySrvRecord | + AnyTxtRecord; + + function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void; + function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + function resolve( + hostname: string, + rrtype: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void, + ): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace resolve { + function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + function __promisify__(hostname: string, rrtype: "ANY"): Promise; + function __promisify__(hostname: string, rrtype: "MX"): Promise; + function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; + function __promisify__(hostname: string, rrtype: "SOA"): Promise; + function __promisify__(hostname: string, rrtype: "SRV"): Promise; + function __promisify__(hostname: string, rrtype: "TXT"): Promise; + function __promisify__(hostname: string, rrtype: string): Promise; + } + + function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace resolve4 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + + function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace resolve6 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + + function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + namespace resolveCname { + function __promisify__(hostname: string): Promise; + } + + function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + namespace resolveMx { + function __promisify__(hostname: string): Promise; + } + + function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + namespace resolveNaptr { + function __promisify__(hostname: string): Promise; + } + + function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + namespace resolveNs { + function __promisify__(hostname: string): Promise; + } + + function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + namespace resolvePtr { + function __promisify__(hostname: string): Promise; + } + + function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void; + namespace resolveSoa { + function __promisify__(hostname: string): Promise; + } + + function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + namespace resolveSrv { + function __promisify__(hostname: string): Promise; + } + + function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + namespace resolveTxt { + function __promisify__(hostname: string): Promise; + } + + function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + namespace resolveAny { + function __promisify__(hostname: string): Promise; + } + + function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void; + function setServers(servers: ReadonlyArray): void; + function getServers(): string[]; + + // Error codes + const NODATA: string; + const FORMERR: string; + const SERVFAIL: string; + const NOTFOUND: string; + const NOTIMP: string; + const REFUSED: string; + const BADQUERY: string; + const BADNAME: string; + const BADFAMILY: string; + const BADRESP: string; + const CONNREFUSED: string; + const TIMEOUT: string; + const EOF: string; + const FILE: string; + const NOMEM: string; + const DESTRUCTION: string; + const BADSTR: string; + const BADFLAGS: string; + const NONAME: string; + const BADHINTS: string; + const NOTINITIALIZED: string; + const LOADIPHLPAPI: string; + const ADDRGETNETWORKPARAMS: string; + const CANCELLED: string; + + class Resolver { + getServers: typeof getServers; + setServers: typeof setServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + cancel(): void; + } + + namespace promises { + function getServers(): string[]; + + function lookup(hostname: string, family: number): Promise; + function lookup(hostname: string, options: LookupOneOptions): Promise; + function lookup(hostname: string, options: LookupAllOptions): Promise; + function lookup(hostname: string, options: LookupOptions): Promise; + function lookup(hostname: string): Promise; + + function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>; + + function resolve(hostname: string): Promise; + function resolve(hostname: string, rrtype: "A"): Promise; + function resolve(hostname: string, rrtype: "AAAA"): Promise; + function resolve(hostname: string, rrtype: "ANY"): Promise; + function resolve(hostname: string, rrtype: "CNAME"): Promise; + function resolve(hostname: string, rrtype: "MX"): Promise; + function resolve(hostname: string, rrtype: "NAPTR"): Promise; + function resolve(hostname: string, rrtype: "NS"): Promise; + function resolve(hostname: string, rrtype: "PTR"): Promise; + function resolve(hostname: string, rrtype: "SOA"): Promise; + function resolve(hostname: string, rrtype: "SRV"): Promise; + function resolve(hostname: string, rrtype: "TXT"): Promise; + function resolve(hostname: string, rrtype: string): Promise; + + function resolve4(hostname: string): Promise; + function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve4(hostname: string, options: ResolveOptions): Promise; + + function resolve6(hostname: string): Promise; + function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve6(hostname: string, options: ResolveOptions): Promise; + + function resolveAny(hostname: string): Promise; + + function resolveCname(hostname: string): Promise; + + function resolveMx(hostname: string): Promise; + + function resolveNaptr(hostname: string): Promise; + + function resolveNs(hostname: string): Promise; + + function resolvePtr(hostname: string): Promise; + + function resolveSoa(hostname: string): Promise; + + function resolveSrv(hostname: string): Promise; + + function resolveTxt(hostname: string): Promise; + + function reverse(ip: string): Promise; + + function setServers(servers: ReadonlyArray): void; + + class Resolver { + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + setServers: typeof setServers; + } + } +} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts new file mode 100644 index 00000000..45e388c4 --- /dev/null +++ b/node_modules/@types/node/domain.d.ts @@ -0,0 +1,16 @@ +declare module "domain" { + import * as events from "events"; + + class Domain extends events.EventEmitter implements NodeJS.Domain { + run(fn: (...args: any[]) => T, ...args: any[]): T; + add(emitter: events.EventEmitter | NodeJS.Timer): void; + remove(emitter: events.EventEmitter | NodeJS.Timer): void; + bind(cb: T): T; + intercept(cb: T): T; + members: Array; + enter(): void; + exit(): void; + } + + function create(): Domain; +} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts new file mode 100644 index 00000000..03f5b905 --- /dev/null +++ b/node_modules/@types/node/events.d.ts @@ -0,0 +1,39 @@ +declare module "events" { + class internal extends NodeJS.EventEmitter { } + + interface NodeEventTarget { + once(event: string | symbol, listener: (...args: any[]) => void): this; + } + + interface DOMEventTarget { + addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any; + } + + namespace internal { + function once(emitter: NodeEventTarget, event: string | symbol): Promise; + function once(emitter: DOMEventTarget, event: string): Promise; + class EventEmitter extends internal { + /** @deprecated since v4.0.0 */ + static listenerCount(emitter: EventEmitter, event: string | symbol): number; + static defaultMaxListeners: number; + + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + rawListeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + eventNames(): Array; + listenerCount(type: string | symbol): number; + } + } + + export = internal; +} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts new file mode 100644 index 00000000..8c57f0c7 --- /dev/null +++ b/node_modules/@types/node/fs.d.ts @@ -0,0 +1,2446 @@ +declare module "fs" { + import * as stream from "stream"; + import * as events from "events"; + import { URL } from "url"; + + /** + * Valid types for path values in "fs". + */ + type PathLike = string | Buffer | URL; + + type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; + + interface StatsBase { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + + dev: number; + ino: number; + mode: number; + nlink: number; + uid: number; + gid: number; + rdev: number; + size: number; + blksize: number; + blocks: number; + atimeMs: number; + mtimeMs: number; + ctimeMs: number; + birthtimeMs: number; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + } + + interface Stats extends StatsBase { + } + + class Stats { + } + + class Dirent { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + name: string; + } + + /** + * A class representing a directory stream. + */ + class Dir { + readonly path: string; + + /** + * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. + */ + [Symbol.asyncIterator](): AsyncIterableIterator; + + /** + * Asynchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + */ + close(): Promise; + close(cb: NoParamCallback): void; + + /** + * Synchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + */ + closeSync(): void; + + /** + * Asynchronously read the next directory entry via `readdir(3)` as an `Dirent`. + * After the read is completed, a value is returned that will be resolved with an `Dirent`, or `null` if there are no more directory entries to read. + * Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms. + */ + read(): Promise; + read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; + + /** + * Synchronously read the next directory entry via `readdir(3)` as a `Dirent`. + * If there are no more directory entries to read, null will be returned. + * Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms. + */ + readSync(): Dirent; + } + + interface FSWatcher extends events.EventEmitter { + close(): void; + + /** + * events.EventEmitter + * 1. change + * 2. error + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + on(event: "error", listener: (error: Error) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + once(event: "error", listener: (error: Error) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + } + + class ReadStream extends stream.Readable { + close(): void; + bytesRead: number; + path: string | Buffer; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + } + + class WriteStream extends stream.Writable { + close(): void; + bytesWritten: number; + path: string | Buffer; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + } + + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace rename { + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; + } + + /** + * Synchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function renameSync(oldPath: PathLike, newPath: PathLike): void; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function truncate(path: PathLike, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace truncate { + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(path: PathLike, len?: number | null): Promise; + } + + /** + * Synchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function truncateSync(path: PathLike, len?: number | null): void; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + function ftruncate(fd: number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace ftruncate { + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(fd: number, len?: number | null): Promise; + } + + /** + * Synchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function ftruncateSync(fd: number, len?: number | null): void; + + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace chown { + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + + /** + * Synchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function chownSync(path: PathLike, uid: number, gid: number): void; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function __promisify__(fd: number, uid: number, gid: number): Promise; + } + + /** + * Synchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function fchownSync(fd: number, uid: number, gid: number): void; + + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lchown { + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + + /** + * Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lchownSync(path: PathLike, uid: number, gid: number): void; + + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function chmod(path: PathLike, mode: string | number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace chmod { + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: string | number): Promise; + } + + /** + * Synchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function chmodSync(path: PathLike, mode: string | number): void; + + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function fchmod(fd: number, mode: string | number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fchmod { + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(fd: number, mode: string | number): Promise; + } + + /** + * Synchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function fchmodSync(fd: number, mode: string | number): void; + + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function lchmod(path: PathLike, mode: string | number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lchmod { + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: string | number): Promise; + } + + /** + * Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function lchmodSync(path: PathLike, mode: string | number): void; + + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace stat { + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function statSync(path: PathLike): Stats; + + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function fstatSync(fd: number): Stats; + + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lstat { + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstatSync(path: PathLike): Stats; + + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace link { + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; + } + + /** + * Synchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function linkSync(existingPath: PathLike, newPath: PathLike): void; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + */ + function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace symlink { + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + + type Type = "dir" | "file" | "junction"; + } + + /** + * Synchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void + ): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace readlink { + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + } + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void + ): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace realpath { + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + + function native( + path: PathLike, + options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void + ): void; + function native(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; + function native(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + } + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + + namespace realpathSync { + function native(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + function native(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + function native(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + } + + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function unlink(path: PathLike, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace unlink { + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function unlinkSync(path: PathLike): void; + + interface RmDirOptions { + /** + * If `true`, perform a recursive directory removal. In + * recursive mode, errors are not reported if `path` does not exist, and + * operations are retried on failure. + * @experimental + * @default false + */ + recursive?: boolean; + } + + interface RmDirAsyncOptions extends RmDirOptions { + /** + * If an `EMFILE` error is encountered, Node.js will + * retry the operation with a linear backoff of 1ms longer on each try until the + * timeout duration passes this limit. This option is ignored if the `recursive` + * option is not `true`. + * @default 1000 + */ + emfileWait?: number; + /** + * If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error is + * encountered, Node.js will retry the operation with a linear backoff wait of + * 100ms longer on each try. This option represents the number of retries. This + * option is ignored if the `recursive` option is not `true`. + * @default 3 + */ + maxBusyTries?: number; + } + + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function rmdir(path: PathLike, callback: NoParamCallback): void; + function rmdir(path: PathLike, options: RmDirAsyncOptions, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace rmdir { + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, options?: RmDirAsyncOptions): Promise; + } + + /** + * Synchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function rmdirSync(path: PathLike, options?: RmDirOptions): void; + + interface MakeDirectoryOptions { + /** + * Indicates whether parent folders should be created. + * @default false + */ + recursive?: boolean; + /** + * A file mode. If a string is passed, it is parsed as an octal integer. If not specified + * @default 0o777. + */ + mode?: number; + } + + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options: number | string | MakeDirectoryOptions | undefined | null, callback: NoParamCallback): void; + + /** + * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function mkdir(path: PathLike, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace mkdir { + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__(path: PathLike, options?: number | string | MakeDirectoryOptions | null): Promise; + } + + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdirSync(path: PathLike, options?: number | string | MakeDirectoryOptions | null): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + */ + function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace mkdtemp { + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: { encoding?: string | null } | string | null): Promise; + } + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options?: { encoding?: string | null } | string | null): string | Buffer; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: { encoding?: string | null; withFileTypes?: false } | string | undefined | null, + callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void, + ): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace readdir { + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false }): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent + */ + function __promisify__(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise; + } + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): string[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Buffer[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): string[] | Buffer[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdirSync(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Dirent[]; + + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function close(fd: number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function closeSync(fd: number): void; + + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace open { + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function __promisify__(path: PathLike, flags: string | number, mode?: string | number | null): Promise; + } + + /** + * Synchronous open(2) - open and possibly create a file, returning a file descriptor.. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function openSync(path: PathLike, flags: string | number, mode?: string | number | null): number; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace utimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + } + + /** + * Synchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace futimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise; + } + + /** + * Synchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void; + + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function fsync(fd: number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function fsyncSync(fd: number): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void + ): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + function write(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function write( + fd: number, + string: any, + position: number | undefined | null, + encoding: string | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + */ + function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace write { + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + offset?: number, + length?: number, + position?: number | null, + ): Promise<{ bytesWritten: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function __promisify__(fd: number, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; + } + + /** + * Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number; + + /** + * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function writeSync(fd: number, string: any, position?: number | null, encoding?: string | null): number; + + /** + * Asynchronously reads data from the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function read( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: number | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace read { + /** + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function __promisify__( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: number | null + ): Promise<{ bytesRead: number, buffer: TBuffer }>; + } + + /** + * Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read. + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: number | null): number; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile( + path: PathLike | number, + options: { encoding?: string | null; flag?: string; } | string | undefined | null, + callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void, + ): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + */ + function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace readFile { + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__(path: PathLike | number, options: { encoding: string; flag?: string; } | string): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): Promise; + } + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`. + */ + function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer; + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFileSync(path: PathLike | number, options: { encoding: string; flag?: string; } | string): string; + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFileSync(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): string | Buffer; + + type WriteFileOptions = { encoding?: string | null; mode?: number | string; flag?: string; } | string | null; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function writeFile(path: PathLike | number, data: any, options: WriteFileOptions, callback: NoParamCallback): void; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function writeFile(path: PathLike | number, data: any, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace writeFile { + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function __promisify__(path: PathLike | number, data: any, options?: WriteFileOptions): Promise; + } + + /** + * Synchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function writeFileSync(path: PathLike | number, data: any, options?: WriteFileOptions): void; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function appendFile(file: PathLike | number, data: any, options: WriteFileOptions, callback: NoParamCallback): void; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function appendFile(file: PathLike | number, data: any, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace appendFile { + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function __promisify__(file: PathLike | number, data: any, options?: WriteFileOptions): Promise; + } + + /** + * Synchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function appendFileSync(file: PathLike | number, data: any, options?: WriteFileOptions): void; + + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + */ + function watchFile(filename: PathLike, options: { persistent?: boolean; interval?: number; } | undefined, listener: (curr: Stats, prev: Stats) => void): void; + + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void; + + /** + * Stop watching for changes on `filename`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch( + filename: PathLike, + options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null, + listener?: (event: string, filename: string) => void, + ): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch(filename: PathLike, options: { encoding: "buffer", persistent?: boolean, recursive?: boolean } | "buffer", listener?: (event: string, filename: Buffer) => void): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch( + filename: PathLike, + options: { encoding?: string | null, persistent?: boolean, recursive?: boolean } | string | null, + listener?: (event: string, filename: string | Buffer) => void, + ): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function watch(filename: PathLike, listener?: (event: string, filename: string) => any): FSWatcher; + + /** + * Asynchronously tests whether or not the given path exists by checking with the file system. + * @deprecated + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function exists(path: PathLike, callback: (exists: boolean) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace exists { + /** + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronously tests whether or not the given path exists by checking with the file system. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function existsSync(path: PathLike): boolean; + + namespace constants { + // File Access Constants + + /** Constant for fs.access(). File is visible to the calling process. */ + const F_OK: number; + + /** Constant for fs.access(). File can be read by the calling process. */ + const R_OK: number; + + /** Constant for fs.access(). File can be written by the calling process. */ + const W_OK: number; + + /** Constant for fs.access(). File can be executed by the calling process. */ + const X_OK: number; + + // File Copy Constants + + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + const COPYFILE_EXCL: number; + + /** + * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. + */ + const COPYFILE_FICLONE: number; + + /** + * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then the operation will fail with an error. + */ + const COPYFILE_FICLONE_FORCE: number; + + // File Open Constants + + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + const O_RDONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + const O_WRONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + const O_RDWR: number; + + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + const O_CREAT: number; + + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + const O_EXCL: number; + + /** + * Constant for fs.open(). Flag indicating that if path identifies a terminal device, + * opening the path shall not cause that terminal to become the controlling terminal for the process + * (if the process does not already have one). + */ + const O_NOCTTY: number; + + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + const O_TRUNC: number; + + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + const O_APPEND: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + const O_DIRECTORY: number; + + /** + * constant for fs.open(). + * Flag indicating reading accesses to the file system will no longer result in + * an update to the atime information associated with the file. + * This flag is available on Linux operating systems only. + */ + const O_NOATIME: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + const O_NOFOLLOW: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + const O_SYNC: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ + const O_DSYNC: number; + + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + const O_SYMLINK: number; + + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + const O_DIRECT: number; + + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + const O_NONBLOCK: number; + + // File Type Constants + + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + const S_IFMT: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + const S_IFREG: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + const S_IFDIR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + const S_IFCHR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + const S_IFBLK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + const S_IFIFO: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + const S_IFLNK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + const S_IFSOCK: number; + + // File Mode Constants + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + const S_IRWXU: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + const S_IRUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + const S_IWUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + const S_IXUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + const S_IRWXG: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + const S_IRGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + const S_IWGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + const S_IXGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + const S_IRWXO: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + const S_IROTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + const S_IWOTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + const S_IXOTH: number; + + /** + * When set, a memory file mapping is used to access the file. This flag + * is available on Windows operating systems only. On other operating systems, + * this flag is ignored. + */ + const UV_FS_O_FILEMAP: number; + } + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function access(path: PathLike, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace access { + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike, mode?: number): Promise; + } + + /** + * Synchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function accessSync(path: PathLike, mode?: number): void; + + /** + * Returns a new `ReadStream` object. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function createReadStream(path: PathLike, options?: string | { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + /** + * @default false + */ + emitClose?: boolean; + start?: number; + end?: number; + highWaterMark?: number; + }): ReadStream; + + /** + * Returns a new `WriteStream` object. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function createWriteStream(path: PathLike, options?: string | { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; + highWaterMark?: number; + }): WriteStream; + + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function fdatasync(fd: number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function fdatasyncSync(fd: number): void; + + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + */ + function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. + */ + function copyFile(src: PathLike, dest: PathLike, flags: number, callback: NoParamCallback): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace copyFile { + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. + * The only supported flag is fs.constants.COPYFILE_EXCL, + * which causes the copy operation to fail if dest already exists. + */ + function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise; + } + + /** + * Synchronously copies src to dest. By default, dest is overwritten if it already exists. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. + * The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. + */ + function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void; + + /** + * Write an array of ArrayBufferViews to the file specified by fd using writev(). + * position is the offset from the beginning of the file where this data should be written. + * It is unsafe to use fs.writev() multiple times on the same file without waiting for the callback. For this scenario, use fs.createWriteStream(). + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to the end of the file. + */ + function writev( + fd: number, + buffers: NodeJS.ArrayBufferView[], + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void + ): void; + function writev( + fd: number, + buffers: NodeJS.ArrayBufferView[], + position: number, + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void + ): void; + + interface WriteVResult { + bytesWritten: number; + buffers: NodeJS.ArrayBufferView[]; + } + + namespace writev { + function __promisify__(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): Promise; + } + + /** + * See `writev`. + */ + function writevSync(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): number; + + interface OpenDirOptions { + encoding?: BufferEncoding; + } + + function opendirSync(path: string, options?: OpenDirOptions): Dir; + + function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + function opendir(path: string, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + + namespace opendir { + function __promisify__(path: string, options?: OpenDirOptions): Promise; + } + + namespace promises { + interface FileHandle { + /** + * Gets the file descriptor for this file handle. + */ + readonly fd: number; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for appending. + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + appendFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + */ + chown(uid: number, gid: number): Promise; + + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + chmod(mode: string | number): Promise; + + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + */ + datasync(): Promise; + + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + */ + sync(): Promise; + + /** + * Asynchronously reads data from the file. + * The `FileHandle` must have been opened for reading. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + read(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; + + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile(options?: { encoding?: null, flag?: string | number } | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile(options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise; + + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile(options?: { encoding?: string | null, flag?: string | number } | string | null): Promise; + + /** + * Asynchronous fstat(2) - Get file status. + */ + stat(): Promise; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param len If not specified, defaults to `0`. + */ + truncate(len?: number): Promise; + + /** + * Asynchronously change file timestamps of the file. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + utimes(atime: string | number | Date, mtime: string | number | Date): Promise; + + /** + * Asynchronously writes `buffer` to the file. + * The `FileHandle` must have been opened for writing. + * @param buffer The buffer that the data will be written to. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + write(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `string` to the file. + * The `FileHandle` must have been opened for writing. + * It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise` + * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + write(data: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for writing. + * It is unsafe to call `writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + writeFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * See `fs.writev` promisified version. + */ + writev(buffers: NodeJS.ArrayBufferView[], position?: number): Promise; + + /** + * Asynchronous close(2) - close a `FileHandle`. + */ + close(): Promise; + } + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function access(path: PathLike, mode?: number): Promise; + + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. The only + * supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if + * `dest` already exists. + */ + function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise; + + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not + * supplied, defaults to `0o666`. + */ + function open(path: PathLike, flags: string | number, mode?: string | number): Promise; + + /** + * Asynchronously reads data from the file referenced by the supplied `FileHandle`. + * @param handle A `FileHandle`. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If + * `null`, data will be read from the current position. + */ + function read( + handle: FileHandle, + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null, + ): Promise<{ bytesRead: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`. + * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` + * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. + * @param handle A `FileHandle`. + * @param buffer The buffer that the data will be written to. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + handle: FileHandle, + buffer: TBuffer, + offset?: number | null, + length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `string` to the file referenced by the supplied `FileHandle`. + * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` + * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. + * @param handle A `FileHandle`. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function write(handle: FileHandle, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; + + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function rename(oldPath: PathLike, newPath: PathLike): Promise; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function truncate(path: PathLike, len?: number): Promise; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param handle A `FileHandle`. + * @param len If not specified, defaults to `0`. + */ + function ftruncate(handle: FileHandle, len?: number): Promise; + + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function rmdir(path: PathLike, options?: RmDirAsyncOptions): Promise; + + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param handle A `FileHandle`. + */ + function fdatasync(handle: FileHandle): Promise; + + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param handle A `FileHandle`. + */ + function fsync(handle: FileHandle): Promise; + + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options?: number | string | MakeDirectoryOptions | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options?: { encoding?: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; + + /** + * Asynchronous fstat(2) - Get file status. + * @param handle A `FileHandle`. + */ + function fstat(handle: FileHandle): Promise; + + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstat(path: PathLike): Promise; + + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function stat(path: PathLike): Promise; + + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function unlink(path: PathLike): Promise; + + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param handle A `FileHandle`. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function fchmod(handle: FileHandle, mode: string | number): Promise; + + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function chmod(path: PathLike, mode: string | number): Promise; + + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function lchmod(path: PathLike, mode: string | number): Promise; + + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lchown(path: PathLike, uid: number, gid: number): Promise; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param handle A `FileHandle`. + */ + function fchown(handle: FileHandle, uid: number, gid: number): Promise; + + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function chown(path: PathLike, uid: number, gid: number): Promise; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`. + * @param handle A `FileHandle`. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options?: { encoding?: string | null } | string | null): Promise; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function writeFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function appendFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: string | number } | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | FileHandle, options?: { encoding?: string | null, flag?: string | number } | string | null): Promise; + + function opendir(path: string, options?: OpenDirOptions): Promise; + } +} diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts new file mode 100644 index 00000000..d9505f16 --- /dev/null +++ b/node_modules/@types/node/globals.d.ts @@ -0,0 +1,1165 @@ +// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build +interface Console { + Console: NodeJS.ConsoleConstructor; + /** + * A simple assertion test that verifies whether `value` is truthy. + * If it is not, an `AssertionError` is thrown. + * If provided, the error `message` is formatted using `util.format()` and used as the error message. + */ + assert(value: any, message?: string, ...optionalParams: any[]): void; + /** + * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY. + * When `stdout` is not a TTY, this method does nothing. + */ + clear(): void; + /** + * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`. + */ + count(label?: string): void; + /** + * Resets the internal counter specific to `label`. + */ + countReset(label?: string): void; + /** + * The `console.debug()` function is an alias for {@link console.log()}. + */ + debug(message?: any, ...optionalParams: any[]): void; + /** + * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`. + * This function bypasses any custom `inspect()` function defined on `obj`. + */ + dir(obj: any, options?: NodeJS.InspectOptions): void; + /** + * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting + */ + dirxml(...data: any[]): void; + /** + * Prints to `stderr` with newline. + */ + error(message?: any, ...optionalParams: any[]): void; + /** + * Increases indentation of subsequent lines by two spaces. + * If one or more `label`s are provided, those are printed first without the additional indentation. + */ + group(...label: any[]): void; + /** + * The `console.groupCollapsed()` function is an alias for {@link console.group()}. + */ + groupCollapsed(...label: any[]): void; + /** + * Decreases indentation of subsequent lines by two spaces. + */ + groupEnd(): void; + /** + * The {@link console.info()} function is an alias for {@link console.log()}. + */ + info(message?: any, ...optionalParams: any[]): void; + /** + * Prints to `stdout` with newline. + */ + log(message?: any, ...optionalParams: any[]): void; + /** + * This method does not display anything unless used in the inspector. + * Prints to `stdout` the array `array` formatted as a table. + */ + table(tabularData: any, properties?: string[]): void; + /** + * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`. + */ + time(label?: string): void; + /** + * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`. + */ + timeEnd(label?: string): void; + /** + * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`. + */ + timeLog(label?: string, ...data: any[]): void; + /** + * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code. + */ + trace(message?: any, ...optionalParams: any[]): void; + /** + * The {@link console.warn()} function is an alias for {@link console.error()}. + */ + warn(message?: any, ...optionalParams: any[]): void; + + // --- Inspector mode only --- + /** + * This method does not display anything unless used in the inspector. + * The console.markTimeline() method is the deprecated form of console.timeStamp(). + * + * @deprecated Use console.timeStamp() instead. + */ + markTimeline(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Starts a JavaScript CPU profile with an optional label. + */ + profile(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector. + */ + profileEnd(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Adds an event with the label `label` to the Timeline panel of the inspector. + */ + timeStamp(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * The console.timeline() method is the deprecated form of console.time(). + * + * @deprecated Use console.time() instead. + */ + timeline(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * The console.timelineEnd() method is the deprecated form of console.timeEnd(). + * + * @deprecated Use console.timeEnd() instead. + */ + timelineEnd(label?: string): void; +} + +interface Error { + stack?: string; +} + +// Declare "static" methods in Error +interface ErrorConstructor { + /** Create .stack property on a target object */ + captureStackTrace(targetObject: Object, constructorOpt?: Function): void; + + /** + * Optional override for formatting stack traces + * + * @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces + */ + prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any; + + stackTraceLimit: number; +} + +interface SymbolConstructor { + readonly observable: symbol; +} + +// Node.js ESNEXT support +interface String { + /** Removes whitespace from the left end of a string. */ + trimLeft(): string; + /** Removes whitespace from the right end of a string. */ + trimRight(): string; +} + +interface ImportMeta { + url: string; +} + +/*-----------------------------------------------* + * * + * GLOBAL * + * * + ------------------------------------------------*/ +declare var process: NodeJS.Process; +declare var global: NodeJS.Global; +declare var console: Console; + +declare var __filename: string; +declare var __dirname: string; + +declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; +declare namespace setTimeout { + function __promisify__(ms: number): Promise; + function __promisify__(ms: number, value: T): Promise; +} +declare function clearTimeout(timeoutId: NodeJS.Timeout): void; +declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; +declare function clearInterval(intervalId: NodeJS.Timeout): void; +declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; +declare namespace setImmediate { + function __promisify__(): Promise; + function __promisify__(value: T): Promise; +} +declare function clearImmediate(immediateId: NodeJS.Immediate): void; + +declare function queueMicrotask(callback: () => void): void; + +// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version. +interface NodeRequireFunction { + /* tslint:disable-next-line:callable-types */ + (id: string): any; +} + +interface NodeRequireCache { + [path: string]: NodeModule; +} + +interface NodeRequire extends NodeRequireFunction { + resolve: RequireResolve; + cache: NodeRequireCache; + /** + * @deprecated + */ + extensions: NodeExtensions; + main: NodeModule | undefined; +} + +interface RequireResolve { + (id: string, options?: { paths?: string[]; }): string; + paths(request: string): string[] | null; +} + +interface NodeExtensions { + '.js': (m: NodeModule, filename: string) => any; + '.json': (m: NodeModule, filename: string) => any; + '.node': (m: NodeModule, filename: string) => any; + [ext: string]: (m: NodeModule, filename: string) => any; +} + +declare var require: NodeRequire; + +interface NodeModule { + exports: any; + require: NodeRequireFunction; + id: string; + filename: string; + loaded: boolean; + parent: NodeModule | null; + children: NodeModule[]; + paths: string[]; +} + +declare var module: NodeModule; + +// Same as module.exports +declare var exports: any; + +// Buffer class +type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"; + +interface Buffer { + constructor: typeof Buffer; +} + +/** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + */ +declare class Buffer extends Uint8Array { + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + constructor(str: string, encoding?: BufferEncoding); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + constructor(size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + constructor(array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + constructor(array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. + */ + constructor(buffer: Buffer); + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer() + */ + static from(arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param data data to create a new Buffer + */ + static from(data: number[]): Buffer; + static from(data: Uint8Array): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + */ + static from(str: string, encoding?: BufferEncoding): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + static of(...items: number[]): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): encoding is BufferEncoding; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength( + string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, + encoding?: BufferEncoding + ): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Uint8Array[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Uint8Array, buf2: Uint8Array): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + /** + * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified. + */ + static poolSize: number; + + write(string: string, encoding?: BufferEncoding): number; + write(string: string, offset: number, encoding?: BufferEncoding): number; + write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer'; data: number[] }; + equals(otherBuffer: Uint8Array): boolean; + compare( + otherBuffer: Uint8Array, + targetStart?: number, + targetEnd?: number, + sourceStart?: number, + sourceEnd?: number + ): number; + copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices. + * + * This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory. + * + * @param begin Where the new `Buffer` will start. Default: `0`. + * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`. + */ + slice(begin?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices. + * + * This method is compatible with `Uint8Array#subarray()`. + * + * @param begin Where the new `Buffer` will start. Default: `0`. + * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`. + */ + subarray(begin?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number): number; + writeUIntBE(value: number, offset: number, byteLength: number): number; + writeIntLE(value: number, offset: number, byteLength: number): number; + writeIntBE(value: number, offset: number, byteLength: number): number; + readUIntLE(offset: number, byteLength: number): number; + readUIntBE(offset: number, byteLength: number): number; + readIntLE(offset: number, byteLength: number): number; + readIntBE(offset: number, byteLength: number): number; + readUInt8(offset: number): number; + readUInt16LE(offset: number): number; + readUInt16BE(offset: number): number; + readUInt32LE(offset: number): number; + readUInt32BE(offset: number): number; + readInt8(offset: number): number; + readInt16LE(offset: number): number; + readInt16BE(offset: number): number; + readInt32LE(offset: number): number; + readInt32BE(offset: number): number; + readFloatLE(offset: number): number; + readFloatBE(offset: number): number; + readDoubleLE(offset: number): number; + readDoubleBE(offset: number): number; + reverse(): this; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number): number; + writeUInt16LE(value: number, offset: number): number; + writeUInt16BE(value: number, offset: number): number; + writeUInt32LE(value: number, offset: number): number; + writeUInt32BE(value: number, offset: number): number; + writeInt8(value: number, offset: number): number; + writeInt16LE(value: number, offset: number): number; + writeInt16BE(value: number, offset: number): number; + writeInt32LE(value: number, offset: number): number; + writeInt32BE(value: number, offset: number): number; + writeFloatLE(value: number, offset: number): number; + writeFloatBE(value: number, offset: number): number; + writeDoubleLE(value: number, offset: number): number; + writeDoubleBE(value: number, offset: number): number; + + fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; + + indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + entries(): IterableIterator<[number, number]>; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; + keys(): IterableIterator; + values(): IterableIterator; +} + +/*----------------------------------------------* +* * +* GLOBAL INTERFACES * +* * +*-----------------------------------------------*/ +declare namespace NodeJS { + interface InspectOptions { + /** + * If set to `true`, getters are going to be + * inspected as well. If set to `'get'` only getters without setter are going + * to be inspected. If set to `'set'` only getters having a corresponding + * setter are going to be inspected. This might cause side effects depending on + * the getter function. + * @default `false` + */ + getters?: 'get' | 'set' | boolean; + showHidden?: boolean; + /** + * @default 2 + */ + depth?: number | null; + colors?: boolean; + customInspect?: boolean; + showProxy?: boolean; + maxArrayLength?: number | null; + breakLength?: number; + /** + * Setting this to `false` causes each object key + * to be displayed on a new line. It will also add new lines to text that is + * longer than `breakLength`. If set to a number, the most `n` inner elements + * are united on a single line as long as all properties fit into + * `breakLength`. Short array elements are also grouped together. Note that no + * text will be reduced below 16 characters, no matter the `breakLength` size. + * For more information, see the example below. + * @default `true` + */ + compact?: boolean | number; + sorted?: boolean | ((a: string, b: string) => number); + } + + interface ConsoleConstructorOptions { + stdout: WritableStream; + stderr?: WritableStream; + ignoreErrors?: boolean; + colorMode?: boolean | 'auto'; + inspectOptions?: InspectOptions; + } + + interface ConsoleConstructor { + prototype: Console; + new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console; + new(options: ConsoleConstructorOptions): Console; + } + + interface CallSite { + /** + * Value of "this" + */ + getThis(): any; + + /** + * Type of "this" as a string. + * This is the name of the function stored in the constructor field of + * "this", if available. Otherwise the object's [[Class]] internal + * property. + */ + getTypeName(): string | null; + + /** + * Current function + */ + getFunction(): Function | undefined; + + /** + * Name of the current function, typically its name property. + * If a name property is not available an attempt will be made to try + * to infer a name from the function's context. + */ + getFunctionName(): string | null; + + /** + * Name of the property [of "this" or one of its prototypes] that holds + * the current function + */ + getMethodName(): string | null; + + /** + * Name of the script [if this function was defined in a script] + */ + getFileName(): string | null; + + /** + * Current line number [if this function was defined in a script] + */ + getLineNumber(): number | null; + + /** + * Current column number [if this function was defined in a script] + */ + getColumnNumber(): number | null; + + /** + * A call site object representing the location where eval was called + * [if this function was created using a call to eval] + */ + getEvalOrigin(): string | undefined; + + /** + * Is this a toplevel invocation, that is, is "this" the global object? + */ + isToplevel(): boolean; + + /** + * Does this call take place in code defined by a call to eval? + */ + isEval(): boolean; + + /** + * Is this call in native V8 code? + */ + isNative(): boolean; + + /** + * Is this a constructor call? + */ + isConstructor(): boolean; + } + + interface ErrnoException extends Error { + errno?: number; + code?: string; + path?: string; + syscall?: string; + stack?: string; + } + + class EventEmitter { + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + rawListeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + listenerCount(type: string | symbol): number; + // Added in Node 6... + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + eventNames(): Array; + } + + interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: string): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: WritableStream): this; + unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; + wrap(oldStream: ReadableStream): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: string, cb?: (err?: Error | null) => void): boolean; + end(cb?: () => void): void; + end(data: string | Uint8Array, cb?: () => void): void; + end(str: string, encoding?: string, cb?: () => void): void; + } + + interface ReadWriteStream extends ReadableStream, WritableStream { } + + interface Domain extends EventEmitter { + run(fn: (...args: any[]) => T, ...args: any[]): T; + add(emitter: EventEmitter | Timer): void; + remove(emitter: EventEmitter | Timer): void; + bind(cb: T): T; + intercept(cb: T): T; + + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string): this; + } + + interface MemoryUsage { + rss: number; + heapTotal: number; + heapUsed: number; + external: number; + } + + interface CpuUsage { + user: number; + system: number; + } + + interface ProcessRelease { + name: string; + sourceUrl?: string; + headersUrl?: string; + libUrl?: string; + lts?: string; + } + + interface ProcessVersions { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + + type Platform = 'aix' + | 'android' + | 'darwin' + | 'freebsd' + | 'linux' + | 'openbsd' + | 'sunos' + | 'win32' + | 'cygwin' + | 'netbsd'; + + type Signals = + "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" | + "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" | + "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" | + "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO"; + + type MultipleResolveType = 'resolve' | 'reject'; + + type BeforeExitListener = (code: number) => void; + type DisconnectListener = () => void; + type ExitListener = (code: number) => void; + type RejectionHandledListener = (promise: Promise) => void; + type UncaughtExceptionListener = (error: Error) => void; + type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise) => void; + type WarningListener = (warning: Error) => void; + type MessageListener = (message: any, sendHandle: any) => void; + type SignalsListener = (signal: Signals) => void; + type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; + type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; + type MultipleResolveListener = (type: MultipleResolveType, promise: Promise, value: any) => void; + + interface Socket extends ReadWriteStream { + isTTY?: true; + } + + interface ProcessEnv { + [key: string]: string | undefined; + } + + interface HRTime { + (time?: [number, number]): [number, number]; + } + + interface ProcessReport { + /** + * Directory where the report is written. + * working directory of the Node.js process. + * @default '' indicating that reports are written to the current + */ + directory: string; + + /** + * Filename where the report is written. + * The default value is the empty string. + * @default '' the output filename will be comprised of a timestamp, + * PID, and sequence number. + */ + filename: string; + + /** + * Returns a JSON-formatted diagnostic report for the running process. + * The report's JavaScript stack trace is taken from err, if present. + */ + getReport(err?: Error): string; + + /** + * If true, a diagnostic report is generated on fatal errors, + * such as out of memory errors or failed C++ assertions. + * @default false + */ + reportOnFatalError: boolean; + + /** + * If true, a diagnostic report is generated when the process + * receives the signal specified by process.report.signal. + * @defaul false + */ + reportOnSignal: boolean; + + /** + * If true, a diagnostic report is generated on uncaught exception. + * @default false + */ + reportOnUncaughtException: boolean; + + /** + * The signal used to trigger the creation of a diagnostic report. + * @default 'SIGUSR2' + */ + signal: Signals; + + /** + * Writes a diagnostic report to a file. If filename is not provided, the default filename + * includes the date, time, PID, and a sequence number. + * The report's JavaScript stack trace is taken from err, if present. + * + * @param fileName Name of the file where the report is written. + * This should be a relative path, that will be appended to the directory specified in + * `process.report.directory`, or the current working directory of the Node.js process, + * if unspecified. + * @param error A custom error used for reporting the JavaScript stack. + * @return Filename of the generated report. + */ + writeReport(fileName?: string): string; + writeReport(error?: Error): string; + writeReport(fileName?: string, err?: Error): string; + } + + interface ResourceUsage { + fsRead: number; + fsWrite: number; + involuntaryContextSwitches: number; + ipcReceived: number; + ipcSent: number; + majorPageFault: number; + maxRSS: number; + minorPageFault: number; + sharedMemorySize: number; + signalsCount: number; + swappedOut: number; + systemCPUTime: number; + unsharedDataSize: number; + unsharedStackSize: number; + userCPUTime: number; + voluntaryContextSwitches: number; + } + + interface Process extends EventEmitter { + /** + * Can also be a tty.WriteStream, not typed due to limitation.s + */ + stdout: WriteStream; + /** + * Can also be a tty.WriteStream, not typed due to limitation.s + */ + stderr: WriteStream; + stdin: ReadStream; + openStdin(): Socket; + argv: string[]; + argv0: string; + execArgv: string[]; + execPath: string; + abort(): void; + chdir(directory: string): void; + cwd(): string; + debugPort: number; + emitWarning(warning: string | Error, name?: string, ctor?: Function): void; + env: ProcessEnv; + exit(code?: number): never; + exitCode?: number; + getgid(): number; + setgid(id: number | string): void; + getuid(): number; + setuid(id: number | string): void; + geteuid(): number; + seteuid(id: number | string): void; + getegid(): number; + setegid(id: number | string): void; + getgroups(): number[]; + setgroups(groups: Array): void; + setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; + hasUncaughtExceptionCaptureCallback(): boolean; + version: string; + versions: ProcessVersions; + config: { + target_defaults: { + cflags: any[]; + default_configuration: string; + defines: string[]; + include_dirs: string[]; + libraries: string[]; + }; + variables: { + clang: number; + host_arch: string; + node_install_npm: boolean; + node_install_waf: boolean; + node_prefix: string; + node_shared_openssl: boolean; + node_shared_v8: boolean; + node_shared_zlib: boolean; + node_use_dtrace: boolean; + node_use_etw: boolean; + node_use_openssl: boolean; + target_arch: string; + v8_no_strict_aliasing: number; + v8_use_snapshot: boolean; + visibility: string; + }; + }; + kill(pid: number, signal?: string | number): void; + pid: number; + ppid: number; + title: string; + arch: string; + platform: Platform; + mainModule?: NodeModule; + memoryUsage(): MemoryUsage; + cpuUsage(previousValue?: CpuUsage): CpuUsage; + nextTick(callback: Function, ...args: any[]): void; + release: ProcessRelease; + features: { + inspector: boolean; + debug: boolean; + uv: boolean; + ipv6: boolean; + tls_alpn: boolean; + tls_sni: boolean; + tls_ocsp: boolean; + tls: boolean; + }; + /** + * Can only be set if not in worker thread. + */ + umask(mask?: number): number; + uptime(): number; + hrtime: HRTime; + domain: Domain; + + // Worker + send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean}, callback?: (error: Error | null) => void): boolean; + disconnect(): void; + connected: boolean; + + /** + * The `process.allowedNodeEnvironmentFlags` property is a special, + * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][] + * environment variable. + */ + allowedNodeEnvironmentFlags: ReadonlySet; + + /** + * Only available with `--experimental-report` + */ + report?: ProcessReport; + + resourceUsage(): ResourceUsage; + + /** + * EventEmitter + * 1. beforeExit + * 2. disconnect + * 3. exit + * 4. message + * 5. rejectionHandled + * 6. uncaughtException + * 7. unhandledRejection + * 8. warning + * 9. message + * 10. + * 11. newListener/removeListener inherited from EventEmitter + */ + addListener(event: "beforeExit", listener: BeforeExitListener): this; + addListener(event: "disconnect", listener: DisconnectListener): this; + addListener(event: "exit", listener: ExitListener): this; + addListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + addListener(event: "warning", listener: WarningListener): this; + addListener(event: "message", listener: MessageListener): this; + addListener(event: Signals, listener: SignalsListener): this; + addListener(event: "newListener", listener: NewListenerListener): this; + addListener(event: "removeListener", listener: RemoveListenerListener): this; + addListener(event: "multipleResolves", listener: MultipleResolveListener): this; + + emit(event: "beforeExit", code: number): boolean; + emit(event: "disconnect"): boolean; + emit(event: "exit", code: number): boolean; + emit(event: "rejectionHandled", promise: Promise): boolean; + emit(event: "uncaughtException", error: Error): boolean; + emit(event: "unhandledRejection", reason: any, promise: Promise): boolean; + emit(event: "warning", warning: Error): boolean; + emit(event: "message", message: any, sendHandle: any): this; + emit(event: Signals, signal: Signals): boolean; + emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this; + emit(event: "multipleResolves", listener: MultipleResolveListener): this; + + on(event: "beforeExit", listener: BeforeExitListener): this; + on(event: "disconnect", listener: DisconnectListener): this; + on(event: "exit", listener: ExitListener): this; + on(event: "rejectionHandled", listener: RejectionHandledListener): this; + on(event: "uncaughtException", listener: UncaughtExceptionListener): this; + on(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + on(event: "warning", listener: WarningListener): this; + on(event: "message", listener: MessageListener): this; + on(event: Signals, listener: SignalsListener): this; + on(event: "newListener", listener: NewListenerListener): this; + on(event: "removeListener", listener: RemoveListenerListener): this; + on(event: "multipleResolves", listener: MultipleResolveListener): this; + + once(event: "beforeExit", listener: BeforeExitListener): this; + once(event: "disconnect", listener: DisconnectListener): this; + once(event: "exit", listener: ExitListener): this; + once(event: "rejectionHandled", listener: RejectionHandledListener): this; + once(event: "uncaughtException", listener: UncaughtExceptionListener): this; + once(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + once(event: "warning", listener: WarningListener): this; + once(event: "message", listener: MessageListener): this; + once(event: Signals, listener: SignalsListener): this; + once(event: "newListener", listener: NewListenerListener): this; + once(event: "removeListener", listener: RemoveListenerListener): this; + once(event: "multipleResolves", listener: MultipleResolveListener): this; + + prependListener(event: "beforeExit", listener: BeforeExitListener): this; + prependListener(event: "disconnect", listener: DisconnectListener): this; + prependListener(event: "exit", listener: ExitListener): this; + prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + prependListener(event: "warning", listener: WarningListener): this; + prependListener(event: "message", listener: MessageListener): this; + prependListener(event: Signals, listener: SignalsListener): this; + prependListener(event: "newListener", listener: NewListenerListener): this; + prependListener(event: "removeListener", listener: RemoveListenerListener): this; + prependListener(event: "multipleResolves", listener: MultipleResolveListener): this; + + prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this; + prependOnceListener(event: "disconnect", listener: DisconnectListener): this; + prependOnceListener(event: "exit", listener: ExitListener): this; + prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + prependOnceListener(event: "warning", listener: WarningListener): this; + prependOnceListener(event: "message", listener: MessageListener): this; + prependOnceListener(event: Signals, listener: SignalsListener): this; + prependOnceListener(event: "newListener", listener: NewListenerListener): this; + prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this; + prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this; + + listeners(event: "beforeExit"): BeforeExitListener[]; + listeners(event: "disconnect"): DisconnectListener[]; + listeners(event: "exit"): ExitListener[]; + listeners(event: "rejectionHandled"): RejectionHandledListener[]; + listeners(event: "uncaughtException"): UncaughtExceptionListener[]; + listeners(event: "unhandledRejection"): UnhandledRejectionListener[]; + listeners(event: "warning"): WarningListener[]; + listeners(event: "message"): MessageListener[]; + listeners(event: Signals): SignalsListener[]; + listeners(event: "newListener"): NewListenerListener[]; + listeners(event: "removeListener"): RemoveListenerListener[]; + listeners(event: "multipleResolves"): MultipleResolveListener[]; + } + + interface Global { + Array: typeof Array; + ArrayBuffer: typeof ArrayBuffer; + Boolean: typeof Boolean; + Buffer: typeof Buffer; + DataView: typeof DataView; + Date: typeof Date; + Error: typeof Error; + EvalError: typeof EvalError; + Float32Array: typeof Float32Array; + Float64Array: typeof Float64Array; + Function: typeof Function; + GLOBAL: Global; + Infinity: typeof Infinity; + Int16Array: typeof Int16Array; + Int32Array: typeof Int32Array; + Int8Array: typeof Int8Array; + Intl: typeof Intl; + JSON: typeof JSON; + Map: MapConstructor; + Math: typeof Math; + NaN: typeof NaN; + Number: typeof Number; + Object: typeof Object; + Promise: Function; + RangeError: typeof RangeError; + ReferenceError: typeof ReferenceError; + RegExp: typeof RegExp; + Set: SetConstructor; + String: typeof String; + Symbol: Function; + SyntaxError: typeof SyntaxError; + TypeError: typeof TypeError; + URIError: typeof URIError; + Uint16Array: typeof Uint16Array; + Uint32Array: typeof Uint32Array; + Uint8Array: typeof Uint8Array; + Uint8ClampedArray: Function; + WeakMap: WeakMapConstructor; + WeakSet: WeakSetConstructor; + clearImmediate: (immediateId: Immediate) => void; + clearInterval: (intervalId: Timeout) => void; + clearTimeout: (timeoutId: Timeout) => void; + console: typeof console; + decodeURI: typeof decodeURI; + decodeURIComponent: typeof decodeURIComponent; + encodeURI: typeof encodeURI; + encodeURIComponent: typeof encodeURIComponent; + escape: (str: string) => string; + eval: typeof eval; + global: Global; + isFinite: typeof isFinite; + isNaN: typeof isNaN; + parseFloat: typeof parseFloat; + parseInt: typeof parseInt; + process: Process; + root: Global; + setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate; + setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; + setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; + queueMicrotask: typeof queueMicrotask; + undefined: typeof undefined; + unescape: (str: string) => string; + gc: () => void; + v8debug?: any; + } + + // compatibility with older typings + interface Timer { + hasRef(): boolean; + ref(): this; + refresh(): this; + unref(): this; + } + + class Immediate { + hasRef(): boolean; + ref(): this; + unref(): this; + _onImmediate: Function; // to distinguish it from the Timeout class + } + + class Timeout implements Timer { + hasRef(): boolean; + ref(): this; + refresh(): this; + unref(): this; + } + + class Module { + static runMain(): void; + static wrap(code: string): string; + + /** + * @deprecated Deprecated since: v12.2.0. Please use createRequire() instead. + */ + static createRequireFromPath(path: string): NodeRequire; + static createRequire(path: string): NodeRequire; + static builtinModules: string[]; + + static Module: typeof Module; + + exports: any; + require: NodeRequireFunction; + id: string; + filename: string; + loaded: boolean; + parent: Module | null; + children: Module[]; + paths: string[]; + + constructor(id: string, parent?: Module); + } + + type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array; + type ArrayBufferView = TypedArray | DataView; + + // The value type here is a "poor man's `unknown`". When these types support TypeScript + // 3.0+, we can replace this with `unknown`. + type PoorMansUnknown = {} | null | undefined; +} diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts new file mode 100644 index 00000000..139a9fb4 --- /dev/null +++ b/node_modules/@types/node/http.d.ts @@ -0,0 +1,371 @@ +declare module "http" { + import * as events from "events"; + import * as stream from "stream"; + import { URL } from "url"; + import { Socket, Server as NetServer } from "net"; + + // incoming headers will never contain number + interface IncomingHttpHeaders { + 'accept'?: string; + 'accept-language'?: string; + 'accept-patch'?: string; + 'accept-ranges'?: string; + 'access-control-allow-credentials'?: string; + 'access-control-allow-headers'?: string; + 'access-control-allow-methods'?: string; + 'access-control-allow-origin'?: string; + 'access-control-expose-headers'?: string; + 'access-control-max-age'?: string; + 'age'?: string; + 'allow'?: string; + 'alt-svc'?: string; + 'authorization'?: string; + 'cache-control'?: string; + 'connection'?: string; + 'content-disposition'?: string; + 'content-encoding'?: string; + 'content-language'?: string; + 'content-length'?: string; + 'content-location'?: string; + 'content-range'?: string; + 'content-type'?: string; + 'cookie'?: string; + 'date'?: string; + 'expect'?: string; + 'expires'?: string; + 'forwarded'?: string; + 'from'?: string; + 'host'?: string; + 'if-match'?: string; + 'if-modified-since'?: string; + 'if-none-match'?: string; + 'if-unmodified-since'?: string; + 'last-modified'?: string; + 'location'?: string; + 'pragma'?: string; + 'proxy-authenticate'?: string; + 'proxy-authorization'?: string; + 'public-key-pins'?: string; + 'range'?: string; + 'referer'?: string; + 'retry-after'?: string; + 'set-cookie'?: string[]; + 'strict-transport-security'?: string; + 'tk'?: string; + 'trailer'?: string; + 'transfer-encoding'?: string; + 'upgrade'?: string; + 'user-agent'?: string; + 'vary'?: string; + 'via'?: string; + 'warning'?: string; + 'www-authenticate'?: string; + [header: string]: string | string[] | undefined; + } + + // outgoing headers allows numbers (as they are converted internally to strings) + interface OutgoingHttpHeaders { + [header: string]: number | string | string[] | undefined; + } + + interface ClientRequestArgs { + protocol?: string | null; + host?: string | null; + hostname?: string | null; + family?: number; + port?: number | string | null; + defaultPort?: number | string; + localAddress?: string; + socketPath?: string; + method?: string; + path?: string | null; + headers?: OutgoingHttpHeaders; + auth?: string | null; + agent?: Agent | boolean; + _defaultAgent?: Agent; + timeout?: number; + setHost?: boolean; + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278 + createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket; + } + + interface ServerOptions { + IncomingMessage?: typeof IncomingMessage; + ServerResponse?: typeof ServerResponse; + } + + type RequestListener = (req: IncomingMessage, res: ServerResponse) => void; + + class Server extends NetServer { + constructor(requestListener?: RequestListener); + constructor(options: ServerOptions, requestListener?: RequestListener); + + setTimeout(msecs?: number, callback?: () => void): this; + setTimeout(callback: () => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @default 2000 + * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount} + */ + maxHeadersCount: number | null; + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP headers. + * @default 40000 + * {@link https://nodejs.org/api/http.html#http_server_headerstimeout} + */ + headersTimeout: number; + keepAliveTimeout: number; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js + class OutgoingMessage extends stream.Writable { + upgrading: boolean; + chunkedEncoding: boolean; + shouldKeepAlive: boolean; + useChunkedEncodingByDefault: boolean; + sendDate: boolean; + finished: boolean; + headersSent: boolean; + connection: Socket; + + constructor(); + + setTimeout(msecs: number, callback?: () => void): this; + setHeader(name: string, value: number | string | string[]): void; + getHeader(name: string): number | string | string[] | undefined; + getHeaders(): OutgoingHttpHeaders; + getHeaderNames(): string[]; + hasHeader(name: string): boolean; + removeHeader(name: string): void; + addTrailers(headers: OutgoingHttpHeaders | Array<[string, string]>): void; + flushHeaders(): void; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_server.js#L108-L256 + class ServerResponse extends OutgoingMessage { + statusCode: number; + statusMessage: string; + writableFinished: boolean; + + constructor(req: IncomingMessage); + + assignSocket(socket: Socket): void; + detachSocket(socket: Socket): void; + // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53 + // no args in writeContinue callback + writeContinue(callback?: () => void): void; + writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): this; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; + writeProcessing(): void; + } + + interface InformationEvent { + statusCode: number; + statusMessage: string; + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77 + class ClientRequest extends OutgoingMessage { + connection: Socket; + socket: Socket; + aborted: number; + + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + + readonly path: string; + abort(): void; + onSocket(socket: Socket): void; + setTimeout(timeout: number, callback?: () => void): this; + setNoDelay(noDelay?: boolean): void; + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + + addListener(event: 'abort', listener: () => void): this; + addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + addListener(event: 'continue', listener: () => void): this; + addListener(event: 'information', listener: (info: InformationEvent) => void): this; + addListener(event: 'response', listener: (response: IncomingMessage) => void): this; + addListener(event: 'socket', listener: (socket: Socket) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + on(event: 'abort', listener: () => void): this; + on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + on(event: 'continue', listener: () => void): this; + on(event: 'information', listener: (info: InformationEvent) => void): this; + on(event: 'response', listener: (response: IncomingMessage) => void): this; + on(event: 'socket', listener: (socket: Socket) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: 'abort', listener: () => void): this; + once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + once(event: 'continue', listener: () => void): this; + once(event: 'information', listener: (info: InformationEvent) => void): this; + once(event: 'response', listener: (response: IncomingMessage) => void): this; + once(event: 'socket', listener: (socket: Socket) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: 'abort', listener: () => void): this; + prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependListener(event: 'continue', listener: () => void): this; + prependListener(event: 'information', listener: (info: InformationEvent) => void): this; + prependListener(event: 'response', listener: (response: IncomingMessage) => void): this; + prependListener(event: 'socket', listener: (socket: Socket) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: 'abort', listener: () => void): this; + prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependOnceListener(event: 'continue', listener: () => void): this; + prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this; + prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this; + prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + class IncomingMessage extends stream.Readable { + constructor(socket: Socket); + + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + complete: boolean; + connection: Socket; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + trailers: { [key: string]: string | undefined }; + rawTrailers: string[]; + setTimeout(msecs: number, callback?: () => void): this; + /** + * Only valid for request obtained from http.Server. + */ + method?: string; + /** + * Only valid for request obtained from http.Server. + */ + url?: string; + /** + * Only valid for response obtained from http.ClientRequest. + */ + statusCode?: number; + /** + * Only valid for response obtained from http.ClientRequest. + */ + statusMessage?: string; + socket: Socket; + destroy(error?: Error): void; + } + + interface AgentOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number; + /** + * Socket timeout in milliseconds. This will set the timeout after the socket is connected. + */ + timeout?: number; + } + + class Agent { + maxFreeSockets: number; + maxSockets: number; + readonly sockets: { + readonly [key: string]: Socket[]; + }; + readonly requests: { + readonly [key: string]: IncomingMessage[]; + }; + + constructor(opts?: AgentOptions); + + /** + * Destroy any sockets that are currently in use by the agent. + * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, + * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, + * sockets may hang open for quite a long time before the server terminates them. + */ + destroy(): void; + } + + const METHODS: string[]; + + const STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + + function createServer(requestListener?: RequestListener): Server; + function createServer(options: ServerOptions, requestListener?: RequestListener): Server; + + // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, + // create interface RequestOptions would make the naming more clear to developers + interface RequestOptions extends ClientRequestArgs { } + function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + let globalAgent: Agent; + + /** + * Read-only property specifying the maximum allowed size of HTTP headers in bytes. + * Defaults to 8KB. Configurable using the [`--max-http-header-size`][] CLI option. + */ + const maxHeaderSize: number; +} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts new file mode 100644 index 00000000..8c16e10c --- /dev/null +++ b/node_modules/@types/node/http2.d.ts @@ -0,0 +1,947 @@ +declare module "http2" { + import * as events from "events"; + import * as fs from "fs"; + import * as net from "net"; + import * as stream from "stream"; + import * as tls from "tls"; + import * as url from "url"; + + import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from "http"; + export { OutgoingHttpHeaders } from "http"; + + export interface IncomingHttpStatusHeader { + ":status"?: number; + } + + export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { + ":path"?: string; + ":method"?: string; + ":authority"?: string; + ":scheme"?: string; + } + + // Http2Stream + + export interface StreamPriorityOptions { + exclusive?: boolean; + parent?: number; + weight?: number; + silent?: boolean; + } + + export interface StreamState { + localWindowSize?: number; + state?: number; + localClose?: number; + remoteClose?: number; + sumDependencyWeight?: number; + weight?: number; + } + + export interface ServerStreamResponseOptions { + endStream?: boolean; + waitForTrailers?: boolean; + } + + export interface StatOptions { + offset: number; + length: number; + } + + export interface ServerStreamFileResponseOptions { + statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean; + waitForTrailers?: boolean; + offset?: number; + length?: number; + } + + export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { + onError?(err: NodeJS.ErrnoException): void; + } + + export interface Http2Stream extends stream.Duplex { + readonly aborted: boolean; + readonly bufferSize: number; + readonly closed: boolean; + readonly destroyed: boolean; + /** + * Set the true if the END_STREAM flag was set in the request or response HEADERS frame received, + * indicating that no additional data should be received and the readable side of the Http2Stream will be closed. + */ + readonly endAfterHeaders: boolean; + readonly id?: number; + readonly pending: boolean; + readonly rstCode: number; + readonly sentHeaders: OutgoingHttpHeaders; + readonly sentInfoHeaders?: OutgoingHttpHeaders[]; + readonly sentTrailers?: OutgoingHttpHeaders; + readonly session: Http2Session; + readonly state: StreamState; + + close(code?: number, callback?: () => void): void; + priority(options: StreamPriorityOptions): void; + setTimeout(msecs: number, callback?: () => void): void; + sendTrailers(headers: OutgoingHttpHeaders): void; + + addListener(event: "aborted", listener: () => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: "streamClosed", listener: (code: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "wantTrailers", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "aborted"): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "frameError", frameType: number, errorCode: number): boolean; + emit(event: "pipe", src: stream.Readable): boolean; + emit(event: "unpipe", src: stream.Readable): boolean; + emit(event: "streamClosed", code: number): boolean; + emit(event: "timeout"): boolean; + emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "wantTrailers"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "aborted", listener: () => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: "streamClosed", listener: (code: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "wantTrailers", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "aborted", listener: () => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: "streamClosed", listener: (code: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "wantTrailers", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "aborted", listener: () => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "streamClosed", listener: (code: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "wantTrailers", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "aborted", listener: () => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "streamClosed", listener: (code: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "wantTrailers", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export interface ClientHttp2Stream extends Http2Stream { + addListener(event: "continue", listener: () => {}): this; + addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "continue"): boolean; + emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "continue", listener: () => {}): this; + on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "continue", listener: () => {}): this; + once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "continue", listener: () => {}): this; + prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "continue", listener: () => {}): this; + prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export interface ServerHttp2Stream extends Http2Stream { + readonly headersSent: boolean; + readonly pushAllowed: boolean; + additionalHeaders(headers: OutgoingHttpHeaders): void; + pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; + respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void; + respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void; + } + + // Http2Session + + export interface Settings { + headerTableSize?: number; + enablePush?: boolean; + initialWindowSize?: number; + maxFrameSize?: number; + maxConcurrentStreams?: number; + maxHeaderListSize?: number; + enableConnectProtocol?: boolean; + } + + export interface ClientSessionRequestOptions { + endStream?: boolean; + exclusive?: boolean; + parent?: number; + weight?: number; + waitForTrailers?: boolean; + } + + export interface SessionState { + effectiveLocalWindowSize?: number; + effectiveRecvDataLength?: number; + nextStreamID?: number; + localWindowSize?: number; + lastProcStreamID?: number; + remoteWindowSize?: number; + outboundQueueSize?: number; + deflateDynamicTableSize?: number; + inflateDynamicTableSize?: number; + } + + export interface Http2Session extends events.EventEmitter { + readonly alpnProtocol?: string; + readonly closed: boolean; + readonly connecting: boolean; + readonly destroyed: boolean; + readonly encrypted?: boolean; + readonly localSettings: Settings; + readonly originSet?: string[]; + readonly pendingSettingsAck: boolean; + readonly remoteSettings: Settings; + readonly socket: net.Socket | tls.TLSSocket; + readonly state: SessionState; + readonly type: number; + + close(callback?: () => void): void; + destroy(error?: Error, code?: number): void; + goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; + ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + ref(): void; + setTimeout(msecs: number, callback?: () => void): void; + settings(settings: Settings): void; + unref(): void; + + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + addListener(event: "localSettings", listener: (settings: Settings) => void): this; + addListener(event: "ping", listener: () => void): this; + addListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean; + emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean; + emit(event: "localSettings", settings: Settings): boolean; + emit(event: "ping"): boolean; + emit(event: "remoteSettings", settings: Settings): boolean; + emit(event: "timeout"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + on(event: "localSettings", listener: (settings: Settings) => void): this; + on(event: "ping", listener: () => void): this; + on(event: "remoteSettings", listener: (settings: Settings) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + once(event: "localSettings", listener: (settings: Settings) => void): this; + once(event: "ping", listener: () => void): this; + once(event: "remoteSettings", listener: (settings: Settings) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependListener(event: "localSettings", listener: (settings: Settings) => void): this; + prependListener(event: "ping", listener: () => void): this; + prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this; + prependOnceListener(event: "ping", listener: () => void): this; + prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export interface ClientHttp2Session extends Http2Session { + request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; + + addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + addListener(event: "origin", listener: (origins: string[]) => void): this; + addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "altsvc", alt: string, origin: string, stream: number): boolean; + emit(event: "origin", origins: string[]): boolean; + emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + on(event: "origin", listener: (origins: string[]) => void): this; + on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + once(event: "origin", listener: (origins: string[]) => void): this; + once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + prependListener(event: "origin", listener: (origins: string[]) => void): this; + prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + prependOnceListener(event: "origin", listener: (origins: string[]) => void): this; + prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export interface AlternativeServiceOptions { + origin: number | string | url.URL; + } + + export interface ServerHttp2Session extends Http2Session { + readonly server: Http2Server | Http2SecureServer; + + altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; + origin(...args: Array): void; + + addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + // Http2Server + + export interface SessionOptions { + maxDeflateDynamicTableSize?: number; + maxSessionMemory?: number; + maxHeaderListPairs?: number; + maxOutstandingPings?: number; + maxSendHeaderBlockLength?: number; + paddingStrategy?: number; + peerMaxConcurrentStreams?: number; + settings?: Settings; + + selectPadding?(frameLen: number, maxFrameLen: number): number; + createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex; + } + + export interface ClientSessionOptions extends SessionOptions { + maxReservedRemoteStreams?: number; + createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex; + } + + export interface ServerSessionOptions extends SessionOptions { + Http1IncomingMessage?: typeof IncomingMessage; + Http1ServerResponse?: typeof ServerResponse; + Http2ServerRequest?: typeof Http2ServerRequest; + Http2ServerResponse?: typeof Http2ServerResponse; + } + + export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { } + export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { } + + export interface ServerOptions extends ServerSessionOptions { } + + export interface SecureServerOptions extends SecureServerSessionOptions { + allowHTTP1?: boolean; + origins?: string[]; + } + + export interface Http2Server extends net.Server { + addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "session", session: ServerHttp2Session): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "timeout"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "session", listener: (session: ServerHttp2Session) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "session", listener: (session: ServerHttp2Session) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + setTimeout(msec?: number, callback?: () => void): this; + } + + export interface Http2SecureServer extends tls.Server { + addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "session", session: ServerHttp2Session): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "timeout"): boolean; + emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "session", listener: (session: ServerHttp2Session) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "session", listener: (session: ServerHttp2Session) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + setTimeout(msec?: number, callback?: () => void): this; + } + + export class Http2ServerRequest extends stream.Readable { + constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: string[]); + + readonly aborted: boolean; + readonly authority: string; + readonly headers: IncomingHttpHeaders; + readonly httpVersion: string; + readonly method: string; + readonly rawHeaders: string[]; + readonly rawTrailers: string[]; + readonly scheme: string; + readonly socket: net.Socket | tls.TLSSocket; + readonly stream: ServerHttp2Stream; + readonly trailers: IncomingHttpHeaders; + readonly url: string; + + setTimeout(msecs: number, callback?: () => void): void; + read(size?: number): Buffer | string | null; + + addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "aborted", hadError: boolean, code: number): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export class Http2ServerResponse extends stream.Stream { + constructor(stream: ServerHttp2Stream); + + readonly connection: net.Socket | tls.TLSSocket; + readonly finished: boolean; + readonly headersSent: boolean; + readonly socket: net.Socket | tls.TLSSocket; + readonly stream: ServerHttp2Stream; + sendDate: boolean; + statusCode: number; + statusMessage: ''; + addTrailers(trailers: OutgoingHttpHeaders): void; + end(callback?: () => void): void; + end(data: string | Uint8Array, callback?: () => void): void; + end(data: string | Uint8Array, encoding: string, callback?: () => void): void; + getHeader(name: string): string; + getHeaderNames(): string[]; + getHeaders(): OutgoingHttpHeaders; + hasHeader(name: string): boolean; + removeHeader(name: string): void; + setHeader(name: string, value: number | string | string[]): void; + setTimeout(msecs: number, callback?: () => void): void; + write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; + write(chunk: string | Uint8Array, encoding: string, callback?: (err: Error) => void): boolean; + writeContinue(): void; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; + writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this; + createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void; + + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "drain"): boolean; + emit(event: "error", error: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: stream.Readable): boolean; + emit(event: "unpipe", src: stream.Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + // Public API + + export namespace constants { + const NGHTTP2_SESSION_SERVER: number; + const NGHTTP2_SESSION_CLIENT: number; + const NGHTTP2_STREAM_STATE_IDLE: number; + const NGHTTP2_STREAM_STATE_OPEN: number; + const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + const NGHTTP2_STREAM_STATE_CLOSED: number; + const NGHTTP2_NO_ERROR: number; + const NGHTTP2_PROTOCOL_ERROR: number; + const NGHTTP2_INTERNAL_ERROR: number; + const NGHTTP2_FLOW_CONTROL_ERROR: number; + const NGHTTP2_SETTINGS_TIMEOUT: number; + const NGHTTP2_STREAM_CLOSED: number; + const NGHTTP2_FRAME_SIZE_ERROR: number; + const NGHTTP2_REFUSED_STREAM: number; + const NGHTTP2_CANCEL: number; + const NGHTTP2_COMPRESSION_ERROR: number; + const NGHTTP2_CONNECT_ERROR: number; + const NGHTTP2_ENHANCE_YOUR_CALM: number; + const NGHTTP2_INADEQUATE_SECURITY: number; + const NGHTTP2_HTTP_1_1_REQUIRED: number; + const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + const NGHTTP2_FLAG_NONE: number; + const NGHTTP2_FLAG_END_STREAM: number; + const NGHTTP2_FLAG_END_HEADERS: number; + const NGHTTP2_FLAG_ACK: number; + const NGHTTP2_FLAG_PADDED: number; + const NGHTTP2_FLAG_PRIORITY: number; + const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + const DEFAULT_SETTINGS_ENABLE_PUSH: number; + const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + const MAX_MAX_FRAME_SIZE: number; + const MIN_MAX_FRAME_SIZE: number; + const MAX_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_DEFAULT_WEIGHT: number; + const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + const PADDING_STRATEGY_NONE: number; + const PADDING_STRATEGY_MAX: number; + const PADDING_STRATEGY_CALLBACK: number; + const HTTP2_HEADER_STATUS: string; + const HTTP2_HEADER_METHOD: string; + const HTTP2_HEADER_AUTHORITY: string; + const HTTP2_HEADER_SCHEME: string; + const HTTP2_HEADER_PATH: string; + const HTTP2_HEADER_ACCEPT_CHARSET: string; + const HTTP2_HEADER_ACCEPT_ENCODING: string; + const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + const HTTP2_HEADER_ACCEPT_RANGES: string; + const HTTP2_HEADER_ACCEPT: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + const HTTP2_HEADER_AGE: string; + const HTTP2_HEADER_ALLOW: string; + const HTTP2_HEADER_AUTHORIZATION: string; + const HTTP2_HEADER_CACHE_CONTROL: string; + const HTTP2_HEADER_CONNECTION: string; + const HTTP2_HEADER_CONTENT_DISPOSITION: string; + const HTTP2_HEADER_CONTENT_ENCODING: string; + const HTTP2_HEADER_CONTENT_LANGUAGE: string; + const HTTP2_HEADER_CONTENT_LENGTH: string; + const HTTP2_HEADER_CONTENT_LOCATION: string; + const HTTP2_HEADER_CONTENT_MD5: string; + const HTTP2_HEADER_CONTENT_RANGE: string; + const HTTP2_HEADER_CONTENT_TYPE: string; + const HTTP2_HEADER_COOKIE: string; + const HTTP2_HEADER_DATE: string; + const HTTP2_HEADER_ETAG: string; + const HTTP2_HEADER_EXPECT: string; + const HTTP2_HEADER_EXPIRES: string; + const HTTP2_HEADER_FROM: string; + const HTTP2_HEADER_HOST: string; + const HTTP2_HEADER_IF_MATCH: string; + const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + const HTTP2_HEADER_IF_NONE_MATCH: string; + const HTTP2_HEADER_IF_RANGE: string; + const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + const HTTP2_HEADER_LAST_MODIFIED: string; + const HTTP2_HEADER_LINK: string; + const HTTP2_HEADER_LOCATION: string; + const HTTP2_HEADER_MAX_FORWARDS: string; + const HTTP2_HEADER_PREFER: string; + const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + const HTTP2_HEADER_RANGE: string; + const HTTP2_HEADER_REFERER: string; + const HTTP2_HEADER_REFRESH: string; + const HTTP2_HEADER_RETRY_AFTER: string; + const HTTP2_HEADER_SERVER: string; + const HTTP2_HEADER_SET_COOKIE: string; + const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + const HTTP2_HEADER_TRANSFER_ENCODING: string; + const HTTP2_HEADER_TE: string; + const HTTP2_HEADER_UPGRADE: string; + const HTTP2_HEADER_USER_AGENT: string; + const HTTP2_HEADER_VARY: string; + const HTTP2_HEADER_VIA: string; + const HTTP2_HEADER_WWW_AUTHENTICATE: string; + const HTTP2_HEADER_HTTP2_SETTINGS: string; + const HTTP2_HEADER_KEEP_ALIVE: string; + const HTTP2_HEADER_PROXY_CONNECTION: string; + const HTTP2_METHOD_ACL: string; + const HTTP2_METHOD_BASELINE_CONTROL: string; + const HTTP2_METHOD_BIND: string; + const HTTP2_METHOD_CHECKIN: string; + const HTTP2_METHOD_CHECKOUT: string; + const HTTP2_METHOD_CONNECT: string; + const HTTP2_METHOD_COPY: string; + const HTTP2_METHOD_DELETE: string; + const HTTP2_METHOD_GET: string; + const HTTP2_METHOD_HEAD: string; + const HTTP2_METHOD_LABEL: string; + const HTTP2_METHOD_LINK: string; + const HTTP2_METHOD_LOCK: string; + const HTTP2_METHOD_MERGE: string; + const HTTP2_METHOD_MKACTIVITY: string; + const HTTP2_METHOD_MKCALENDAR: string; + const HTTP2_METHOD_MKCOL: string; + const HTTP2_METHOD_MKREDIRECTREF: string; + const HTTP2_METHOD_MKWORKSPACE: string; + const HTTP2_METHOD_MOVE: string; + const HTTP2_METHOD_OPTIONS: string; + const HTTP2_METHOD_ORDERPATCH: string; + const HTTP2_METHOD_PATCH: string; + const HTTP2_METHOD_POST: string; + const HTTP2_METHOD_PRI: string; + const HTTP2_METHOD_PROPFIND: string; + const HTTP2_METHOD_PROPPATCH: string; + const HTTP2_METHOD_PUT: string; + const HTTP2_METHOD_REBIND: string; + const HTTP2_METHOD_REPORT: string; + const HTTP2_METHOD_SEARCH: string; + const HTTP2_METHOD_TRACE: string; + const HTTP2_METHOD_UNBIND: string; + const HTTP2_METHOD_UNCHECKOUT: string; + const HTTP2_METHOD_UNLINK: string; + const HTTP2_METHOD_UNLOCK: string; + const HTTP2_METHOD_UPDATE: string; + const HTTP2_METHOD_UPDATEREDIRECTREF: string; + const HTTP2_METHOD_VERSION_CONTROL: string; + const HTTP_STATUS_CONTINUE: number; + const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + const HTTP_STATUS_PROCESSING: number; + const HTTP_STATUS_OK: number; + const HTTP_STATUS_CREATED: number; + const HTTP_STATUS_ACCEPTED: number; + const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + const HTTP_STATUS_NO_CONTENT: number; + const HTTP_STATUS_RESET_CONTENT: number; + const HTTP_STATUS_PARTIAL_CONTENT: number; + const HTTP_STATUS_MULTI_STATUS: number; + const HTTP_STATUS_ALREADY_REPORTED: number; + const HTTP_STATUS_IM_USED: number; + const HTTP_STATUS_MULTIPLE_CHOICES: number; + const HTTP_STATUS_MOVED_PERMANENTLY: number; + const HTTP_STATUS_FOUND: number; + const HTTP_STATUS_SEE_OTHER: number; + const HTTP_STATUS_NOT_MODIFIED: number; + const HTTP_STATUS_USE_PROXY: number; + const HTTP_STATUS_TEMPORARY_REDIRECT: number; + const HTTP_STATUS_PERMANENT_REDIRECT: number; + const HTTP_STATUS_BAD_REQUEST: number; + const HTTP_STATUS_UNAUTHORIZED: number; + const HTTP_STATUS_PAYMENT_REQUIRED: number; + const HTTP_STATUS_FORBIDDEN: number; + const HTTP_STATUS_NOT_FOUND: number; + const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + const HTTP_STATUS_NOT_ACCEPTABLE: number; + const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + const HTTP_STATUS_REQUEST_TIMEOUT: number; + const HTTP_STATUS_CONFLICT: number; + const HTTP_STATUS_GONE: number; + const HTTP_STATUS_LENGTH_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_FAILED: number; + const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + const HTTP_STATUS_URI_TOO_LONG: number; + const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + const HTTP_STATUS_EXPECTATION_FAILED: number; + const HTTP_STATUS_TEAPOT: number; + const HTTP_STATUS_MISDIRECTED_REQUEST: number; + const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + const HTTP_STATUS_LOCKED: number; + const HTTP_STATUS_FAILED_DEPENDENCY: number; + const HTTP_STATUS_UNORDERED_COLLECTION: number; + const HTTP_STATUS_UPGRADE_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_REQUIRED: number; + const HTTP_STATUS_TOO_MANY_REQUESTS: number; + const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + const HTTP_STATUS_NOT_IMPLEMENTED: number; + const HTTP_STATUS_BAD_GATEWAY: number; + const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + const HTTP_STATUS_GATEWAY_TIMEOUT: number; + const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + const HTTP_STATUS_LOOP_DETECTED: number; + const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + const HTTP_STATUS_NOT_EXTENDED: number; + const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; + } + + export function getDefaultSettings(): Settings; + export function getPackedSettings(settings: Settings): Buffer; + export function getUnpackedSettings(buf: Uint8Array): Settings; + + export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + + export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + + export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session; + export function connect( + authority: string | url.URL, + options?: ClientSessionOptions | SecureClientSessionOptions, + listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void + ): ClientHttp2Session; +} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts new file mode 100644 index 00000000..6f33dbd0 --- /dev/null +++ b/node_modules/@types/node/https.d.ts @@ -0,0 +1,53 @@ +declare module "https" { + import * as tls from "tls"; + import * as events from "events"; + import * as http from "http"; + import { URL } from "url"; + + type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; + + type RequestOptions = http.RequestOptions & tls.SecureContextOptions & { + rejectUnauthorized?: boolean; // Defaults to true + servername?: string; // SNI TLS Extension + }; + + interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + rejectUnauthorized?: boolean; + maxCachedSessions?: number; + } + + class Agent extends http.Agent { + constructor(options?: AgentOptions); + options: AgentOptions; + } + + class Server extends tls.Server { + constructor(requestListener?: http.RequestListener); + constructor(options: ServerOptions, requestListener?: http.RequestListener); + + setTimeout(callback: () => void): this; + setTimeout(msecs?: number, callback?: () => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @default 2000 + * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount} + */ + maxHeadersCount: number | null; + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP headers. + * @default 40000 + * {@link https://nodejs.org/api/http.html#http_server_headerstimeout} + */ + headersTimeout: number; + keepAliveTimeout: number; + } + + function createServer(requestListener?: http.RequestListener): Server; + function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server; + function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + let globalAgent: Agent; +} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts new file mode 100644 index 00000000..60f72c92 --- /dev/null +++ b/node_modules/@types/node/index.d.ts @@ -0,0 +1,104 @@ +// Type definitions for non-npm package Node.js 12.12 +// Project: http://nodejs.org/ +// Definitions by: Microsoft TypeScript +// DefinitelyTyped +// Alberto Schiabel +// Alexander T. +// Alvis HT Tang +// Andrew Makarov +// Benjamin Toueg +// Bruno Scheufler +// Chigozirim C. +// Christian Vaagland Tellnes +// David Junger +// Deividas Bakanas +// Eugene Y. Q. Shen +// Flarna +// Hannes Magnusson +// Hoàng Văn Khải +// Huw +// Kelvin Jin +// Klaus Meinhardt +// Lishude +// Mariusz Wiktorczyk +// Mohsen Azimi +// Nicolas Even +// Nicolas Voigt +// Nikita Galkin +// Parambir Singh +// Sebastian Silbermann +// Simon Schick +// Thomas den Hollander +// Wilco Bakker +// wwwy3y3 +// Zane Hannan AU +// Samuel Ainsworth +// Kyle Uehlein +// Jordi Oliveras Rovira +// Thanik Bhongbhibhat +// Marcin Kopacz +// Trivikram Kamat +// Minh Son Nguyen +// Junxiao Shi +// Ilia Baryshnikov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// NOTE: These definitions support NodeJS and TypeScript 3.2. + +// NOTE: TypeScript version-specific augmentations can be found in the following paths: +// - ~/base.d.ts - Shared definitions common to all TypeScript versions +// - ~/index.d.ts - Definitions specific to TypeScript 2.1 +// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 + +// NOTE: Augmentations for TypeScript 3.2 and later should use individual files for overrides +// within the respective ~/ts3.2 (or later) folder. However, this is disallowed for versions +// prior to TypeScript 3.2, so the older definitions will be found here. + +// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: +/// + +// TypeScript 2.1-specific augmentations: + +// Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`) +// Empty interfaces are used here which merge fine with the real declarations in the lib XXX files +// just to ensure the names are known and node typings can be sued without importing these libs. +// if someone really needs these types the libs need to be added via --lib or in tsconfig.json +interface MapConstructor { } +interface WeakMapConstructor { } +interface SetConstructor { } +interface WeakSetConstructor { } +interface Set {} +interface Map {} +interface ReadonlySet {} +interface Iterable { } +interface IteratorResult { } +interface AsyncIterable { } +interface Iterator { + next(value?: any): IteratorResult; +} +interface IterableIterator { } +interface AsyncIterableIterator {} +interface SymbolConstructor { + readonly iterator: symbol; + readonly asyncIterator: symbol; +} +declare var Symbol: SymbolConstructor; +// even this is just a forward declaration some properties are added otherwise +// it would be allowed to pass anything to e.g. Buffer.from() +interface SharedArrayBuffer { + readonly byteLength: number; + slice(begin?: number, end?: number): SharedArrayBuffer; +} + +declare module "util" { + namespace inspect { + const custom: symbol; + } + namespace promisify { + const custom: symbol; + } + namespace types { + function isBigInt64Array(value: any): boolean; + function isBigUint64Array(value: any): boolean; + } +} diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts new file mode 100644 index 00000000..b14aed2b --- /dev/null +++ b/node_modules/@types/node/inspector.d.ts @@ -0,0 +1,3034 @@ +// tslint:disable-next-line:dt-header +// Type definitions for inspector + +// These definitions are auto-generated. +// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 +// for more information. + +// tslint:disable:max-line-length + +/** + * The inspector module provides an API for interacting with the V8 inspector. + */ +declare module "inspector" { + import { EventEmitter } from 'events'; + + interface InspectorNotification { + method: string; + params: T; + } + + namespace Schema { + /** + * Description of the protocol domain. + */ + interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + + interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Domain[]; + } + } + + namespace Runtime { + /** + * Unique script identifier. + */ + type ScriptId = string; + + /** + * Unique object identifier. + */ + type RemoteObjectId = string; + + /** + * Primitive value which cannot be JSON-stringified. + */ + type UnserializableValue = string; + + /** + * Mirror object referencing original JavaScript object. + */ + interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string; + /** + * Object class (constructor) name. Specified for object type values only. + */ + className?: string; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have value, but gets this property. + */ + unserializableValue?: UnserializableValue; + /** + * String representation of the object. + */ + description?: string; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: RemoteObjectId; + /** + * Preview containing abbreviated property values. Specified for object type values only. + * @experimental + */ + preview?: ObjectPreview; + /** + * @experimental + */ + customPreview?: CustomPreview; + } + + /** + * @experimental + */ + interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: RemoteObjectId; + bindRemoteObjectFunctionId: RemoteObjectId; + configObjectId?: RemoteObjectId; + } + + /** + * Object containing abbreviated remote object value. + * @experimental + */ + interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string; + /** + * String representation of the object. + */ + description?: string; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: PropertyPreview[]; + /** + * List of the entries. Specified for map and set subtype values only. + */ + entries?: EntryPreview[]; + } + + /** + * @experimental + */ + interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string; + /** + * Nested value preview. + */ + valuePreview?: ObjectPreview; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string; + } + + /** + * @experimental + */ + interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: ObjectPreview; + /** + * Preview of the value. + */ + value: ObjectPreview; + } + + /** + * Object property descriptor. + */ + interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean; + /** + * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). + */ + get?: RemoteObject; + /** + * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). + */ + set?: RemoteObject; + /** + * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean; + /** + * Property symbol object, if the property is of the symbol type. + */ + symbol?: RemoteObject; + } + + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject; + } + + /** + * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. + */ + interface CallArgument { + /** + * Primitive value or serializable javascript object. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: UnserializableValue; + /** + * Remote object handle. + */ + objectId?: RemoteObjectId; + } + + /** + * Id of an execution context. + */ + type ExecutionContextId = number; + + /** + * Description of an isolated world. + */ + interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + */ + id: ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: {}; + } + + /** + * Detailed information about exception (or error) that was thrown during script compilation or execution. + */ + interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: ScriptId; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string; + /** + * JavaScript stack trace if available. + */ + stackTrace?: StackTrace; + /** + * Exception object if available. + */ + exception?: RemoteObject; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: ExecutionContextId; + } + + /** + * Number of milliseconds since epoch. + */ + type Timestamp = number; + + /** + * Stack entry for runtime errors and assertions. + */ + interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + + /** + * Call frames for assertions or error messages. + */ + interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + */ + description?: string; + /** + * JavaScript function name. + */ + callFrames: CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: StackTrace; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + * @experimental + */ + parentId?: StackTraceId; + } + + /** + * Unique identifier of current debugger. + * @experimental + */ + type UniqueDebuggerId = string; + + /** + * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. + * @experimental + */ + interface StackTraceId { + id: string; + debuggerId?: UniqueDebuggerId; + } + + interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + contextId?: ExecutionContextId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean; + } + + interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean; + } + + interface CallFunctionOnParameterType { + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Identifier of the object to call function on. Either objectId or executionContextId should be specified. + */ + objectId?: RemoteObjectId; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target object. + */ + arguments?: CallArgument[]; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean; + /** + * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. + */ + executionContextId?: ExecutionContextId; + /** + * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. + */ + objectGroup?: string; + } + + interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype chain. + */ + ownProperties?: boolean; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean; + } + + interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: RemoteObjectId; + } + + interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + + interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + + interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId; + } + + interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean; + } + + interface QueryObjectsParameterType { + /** + * Identifier of the prototype to return objects for. + */ + prototypeObjectId: RemoteObjectId; + } + + interface GlobalLexicalScopeNamesParameterType { + /** + * Specifies in which execution context to lookup global scope variables. + */ + executionContextId?: ExecutionContextId; + } + + interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: ExceptionDetails; + } + + interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: InternalPropertyDescriptor[]; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: ScriptId; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface RunScriptReturnType { + /** + * Run result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface QueryObjectsReturnType { + /** + * Array with objects. + */ + objects: RemoteObject; + } + + interface GlobalLexicalScopeNamesReturnType { + names: string[]; + } + + interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: ExecutionContextDescription; + } + + interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: ExecutionContextId; + } + + interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Timestamp; + exceptionDetails: ExceptionDetails; + } + + interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in exceptionThrown. + */ + exceptionId: number; + } + + interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: StackTrace; + /** + * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. + * @experimental + */ + context?: string; + } + + interface InspectRequestedEventDataType { + object: RemoteObject; + hints: {}; + } + } + + namespace Debugger { + /** + * Breakpoint identifier. + */ + type BreakpointId = string; + + /** + * Call frame identifier. + */ + type CallFrameId = string; + + /** + * Location in the source code. + */ + interface Location { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number; + } + + /** + * Location in the source code. + * @experimental + */ + interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + */ + functionLocation?: Location; + /** + * Location in the source code. + */ + location: Location; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Scope chain for this call frame. + */ + scopeChain: Scope[]; + /** + * this object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject; + } + + /** + * Scope description. + */ + interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string; + /** + * Location in the source code where scope starts + */ + startLocation?: Location; + /** + * Location in the source code where scope ends + */ + endLocation?: Location; + } + + /** + * Search match for resource. + */ + interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + + interface BreakLocation { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number; + type?: string; + } + + interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + + interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + + interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. + */ + urlRegex?: string; + /** + * Script hash of the resources to set breakpoint on. + */ + scriptHash?: string; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + interface RemoveBreakpointParameterType { + breakpointId: BreakpointId; + } + + interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + */ + end?: Location; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean; + } + + interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Location; + targetCallFrames?: string; + } + + interface PauseOnAsyncCallParameterType { + /** + * Debugger will pause when async call with given stack trace is started. + */ + parentStackTraceId: Runtime.StackTraceId; + } + + interface StepIntoParameterType { + /** + * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. + * @experimental + */ + breakOnAsyncCall?: boolean; + } + + interface GetStackTraceParameterType { + stackTraceId: Runtime.StackTraceId; + } + + interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean; + } + + interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. + */ + dryRun?: boolean; + } + + interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + } + + interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + + interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + + interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). + */ + objectGroup?: string; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults to false. + */ + includeCommandLineAPI?: boolean; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + */ + throwOnSideEffect?: boolean; + } + + interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: CallFrameId; + } + + interface SetReturnValueParameterType { + /** + * New return value. + */ + newValue: Runtime.CallArgument; + } + + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). + */ + maxDepth: number; + } + + interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + + interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: ScriptPosition[]; + } + + interface EnableReturnType { + /** + * Unique identifier of the debugger. + * @experimental + */ + debuggerId: Runtime.UniqueDebuggerId; + } + + interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Location[]; + } + + interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Location; + } + + interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: BreakLocation[]; + } + + interface GetStackTraceReturnType { + stackTrace: Runtime.StackTrace; + } + + interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: SearchMatch[]; + } + + interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: CallFrame[]; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId; + } + + interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + + interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {}; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean; + /** + * This script length. + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + + interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {}; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean; + /** + * This script length. + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + + interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: BreakpointId; + /** + * Actual breakpoint location. + */ + location: Location; + } + + interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: {}; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId; + /** + * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. + * @experimental + */ + asyncCallStackTraceId?: Runtime.StackTraceId; + } + } + + namespace Console { + /** + * Console message. + */ + interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number; + } + + interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: ConsoleMessage; + } + } + + namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + */ + hitCount?: number; + /** + * Child node ids. + */ + children?: number[]; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + */ + deoptReason?: string; + /** + * An array of source position ticks. + */ + positionTicks?: PositionTickInfo[]; + } + + /** + * Profile. + */ + interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[]; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. + */ + timeDeltas?: number[]; + } + + /** + * Specifies a number of samples attributed to a certain source position. + */ + interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + + /** + * Coverage data for a source range. + */ + interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + + /** + * Coverage data for a JavaScript function. + */ + interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + + /** + * Coverage data for a JavaScript script. + */ + interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: FunctionCoverage[]; + } + + /** + * Describes a type collected during runtime. + * @experimental + */ + interface TypeObject { + /** + * Name of a type collected with type profiling. + */ + name: string; + } + + /** + * Source offset and types for a parameter or return value. + * @experimental + */ + interface TypeProfileEntry { + /** + * Source offset of the parameter or end of function for return values. + */ + offset: number; + /** + * The types for this parameter or return value. + */ + types: TypeObject[]; + } + + /** + * Type profile data collected during runtime for a JavaScript script. + * @experimental + */ + interface ScriptTypeProfile { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Type profile entries for parameters and return values of the functions in the script. + */ + entries: TypeProfileEntry[]; + } + + interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + + interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean; + /** + * Collect block-based coverage. + */ + detailed?: boolean; + } + + interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profile; + } + + interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + + interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + + interface TakeTypeProfileReturnType { + /** + * Type profile for all scripts since startTypeProfile() was turned on. + */ + result: ScriptTypeProfile[]; + } + + interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + + interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + } + + namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + type HeapSnapshotObjectId = string; + + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: SamplingHeapProfileNode[]; + } + + /** + * Profile. + */ + interface SamplingHeapProfile { + head: SamplingHeapProfileNode; + } + + interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean; + } + + interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + */ + reportProgress?: boolean; + } + + interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean; + } + + interface GetObjectByHeapObjectIdParameterType { + objectId: HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + } + + interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapSnapshotObjectId; + } + + interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + + interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + */ + samplingInterval?: number; + } + + interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + + interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapSnapshotObjectId; + } + + interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: SamplingHeapProfile; + } + + interface GetSamplingProfileReturnType { + /** + * Return the sampling profile being collected. + */ + profile: SamplingHeapProfile; + } + + interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + + interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean; + } + + interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + + interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + } + + namespace NodeTracing { + interface TraceConfig { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: string; + /** + * Included category filters. + */ + includedCategories: string[]; + } + + interface StartParameterType { + traceConfig: TraceConfig; + } + + interface GetCategoriesReturnType { + /** + * A list of supported tracing categories. + */ + categories: string[]; + } + + interface DataCollectedEventDataType { + value: Array<{}>; + } + } + + namespace NodeWorker { + type WorkerID = string; + + /** + * Unique identifier of attached debugging session. + */ + type SessionID = string; + + interface WorkerInfo { + workerId: WorkerID; + type: string; + title: string; + url: string; + } + + interface SendMessageToWorkerParameterType { + message: string; + /** + * Identifier of the session. + */ + sessionId: SessionID; + } + + interface EnableParameterType { + /** + * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` + * message to run them. + */ + waitForDebuggerOnStart: boolean; + } + + interface DetachParameterType { + sessionId: SessionID; + } + + interface AttachedToWorkerEventDataType { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + workerInfo: WorkerInfo; + waitingForDebugger: boolean; + } + + interface DetachedFromWorkerEventDataType { + /** + * Detached session identifier. + */ + sessionId: SessionID; + } + + interface ReceivedMessageFromWorkerEventDataType { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + } + } + + namespace NodeRuntime { + interface NotifyWhenWaitingForDisconnectParameterType { + enabled: boolean; + } + } + + /** + * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. + */ + class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. + */ + constructor(); + + /** + * Connects a session to the inspector back-end. + * An exception will be thrown if there is already a connected session established either + * through the API or by a front-end connected to the Inspector WebSocket port. + */ + connect(): void; + + /** + * Immediately close the session. All pending message callbacks will be called with an error. + * session.connect() will need to be called to be able to send messages again. + * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + + /** + * Posts a message to the inspector back-end. callback will be notified when a response is received. + * callback is a function that accepts two optional arguments - error and message-specific result. + */ + post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; + post(method: string, callback?: (err: Error | null, params?: {}) => void): void; + + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; + + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; + + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; + + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; + + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; + + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; + + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; + + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + + post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + + /** + * Returns all let, const and class variables from global scope. + */ + post( + method: "Runtime.globalLexicalScopeNames", + params?: Runtime.GlobalLexicalScopeNamesParameterType, + callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void + ): void; + post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; + + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; + + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; + + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; + + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; + + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; + + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + */ + post( + method: "Debugger.getPossibleBreakpoints", + params?: Debugger.GetPossibleBreakpointsParameterType, + callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void + ): void; + post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; + + /** + * @experimental + */ + post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void; + + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; + + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; + + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; + + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; + + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; + + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; + + /** + * Returns stack trace with given stackTraceId. + * @experimental + */ + post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + + /** + * Searches for given string in script content. + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; + + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; + + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void; + + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; + + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; + + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; + + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: "Console.enable", callback?: (err: Error | null) => void): void; + + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable", callback?: (err: Error | null) => void): void; + + /** + * Does nothing. + */ + post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; + + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.start", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + */ + post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + */ + post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + */ + post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + + /** + * Enable type profile. + * @experimental + */ + post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void; + + /** + * Disable type profile. Disabling releases type profile data collected so far. + * @experimental + */ + post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void; + + /** + * Collect type profile. + * @experimental + */ + post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void; + + post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; + + post( + method: "HeapProfiler.getObjectByHeapObjectId", + params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, + callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void + ): void; + post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + + post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; + + /** + * Gets supported tracing categories. + */ + post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; + + /** + * Start trace events collection. + */ + post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; + + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; + + /** + * Sends protocol message over session with given id. + */ + post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; + + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; + + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; + + /** + * Detached from the worker with given sessionId. + */ + post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void; + + /** + * Enable the `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void; + + // Events + + addListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; + emit(event: "NodeTracing.tracingComplete"): boolean; + emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeRuntime.waitingForDisconnect"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + } + + // Top Level API + + /** + * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started. + * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client. + * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param wait Block until a client has connected. Optional, defaults to false. + */ + function open(port?: number, host?: string, wait?: boolean): void; + + /** + * Deactivate the inspector. Blocks until there are no active connections. + */ + function close(): void; + + /** + * Return the URL of the active inspector, or `undefined` if there is none. + */ + function url(): string | undefined; +} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts new file mode 100644 index 00000000..f512be7e --- /dev/null +++ b/node_modules/@types/node/module.d.ts @@ -0,0 +1,3 @@ +declare module "module" { + export = NodeJS.Module; +} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts new file mode 100644 index 00000000..1e4f9718 --- /dev/null +++ b/node_modules/@types/node/net.d.ts @@ -0,0 +1,268 @@ +declare module "net" { + import * as stream from "stream"; + import * as events from "events"; + import * as dns from "dns"; + + type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + + interface AddressInfo { + address: string; + family: string; + port: number; + } + + interface SocketConstructorOpts { + fd?: number; + allowHalfOpen?: boolean; + readable?: boolean; + writable?: boolean; + } + + interface OnReadOpts { + buffer: Uint8Array | (() => Uint8Array); + /** + * This function is called for every chunk of incoming data. + * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer. + * Return false from this function to implicitly pause() the socket. + */ + callback(bytesWritten: number, buf: Uint8Array): boolean; + } + + interface ConnectOpts { + /** + * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket. + * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will + * still be emitted as normal and methods like pause() and resume() will also behave as expected. + */ + onread?: OnReadOpts; + } + + interface TcpSocketConnectOpts extends ConnectOpts { + port: number; + host?: string; + localAddress?: string; + localPort?: number; + hints?: number; + family?: number; + lookup?: LookupFunction; + } + + interface IpcSocketConnectOpts extends ConnectOpts { + path: string; + } + + type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + + class Socket extends stream.Duplex { + constructor(options?: SocketConstructorOpts); + + // Extended base methods + write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean; + write(str: Uint8Array | string, encoding?: string, cb?: (err?: Error) => void): boolean; + + connect(options: SocketConnectOpts, connectionListener?: () => void): this; + connect(port: number, host: string, connectionListener?: () => void): this; + connect(port: number, connectionListener?: () => void): this; + connect(path: string, connectionListener?: () => void): this; + + setEncoding(encoding?: string): this; + pause(): this; + resume(): this; + setTimeout(timeout: number, callback?: () => void): this; + setNoDelay(noDelay?: boolean): this; + setKeepAlive(enable?: boolean, initialDelay?: number): this; + address(): AddressInfo | string; + unref(): void; + ref(): void; + + readonly bufferSize: number; + readonly bytesRead: number; + readonly bytesWritten: number; + readonly connecting: boolean; + readonly destroyed: boolean; + readonly localAddress: string; + readonly localPort: number; + readonly remoteAddress?: string; + readonly remoteFamily?: string; + readonly remotePort?: number; + + // Extended base methods + end(cb?: () => void): void; + end(buffer: Uint8Array | string, cb?: () => void): void; + end(str: Uint8Array | string, encoding?: string, cb?: () => void): void; + + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. data + * 4. drain + * 5. end + * 6. error + * 7. lookup + * 8. timeout + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: (had_error: boolean) => void): this; + addListener(event: "connect", listener: () => void): this; + addListener(event: "data", listener: (data: Buffer) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + addListener(event: "timeout", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close", had_error: boolean): boolean; + emit(event: "connect"): boolean; + emit(event: "data", data: Buffer): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; + emit(event: "timeout"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: (had_error: boolean) => void): this; + on(event: "connect", listener: () => void): this; + on(event: "data", listener: (data: Buffer) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + on(event: "timeout", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: (had_error: boolean) => void): this; + once(event: "connect", listener: () => void): this; + once(event: "data", listener: (data: Buffer) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + once(event: "timeout", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: (had_error: boolean) => void): this; + prependListener(event: "connect", listener: () => void): this; + prependListener(event: "data", listener: (data: Buffer) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependListener(event: "timeout", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; + prependOnceListener(event: "connect", listener: () => void): this; + prependOnceListener(event: "data", listener: (data: Buffer) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + } + + interface ListenOptions { + port?: number; + host?: string; + backlog?: number; + path?: string; + exclusive?: boolean; + readableAll?: boolean; + writableAll?: boolean; + /** + * @default false + */ + ipv6Only?: boolean; + } + + // https://github.com/nodejs/node/blob/master/lib/net.js + class Server extends events.EventEmitter { + constructor(connectionListener?: (socket: Socket) => void); + constructor(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void); + + listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, hostname?: string, listeningListener?: () => void): this; + listen(port?: number, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, listeningListener?: () => void): this; + listen(path: string, backlog?: number, listeningListener?: () => void): this; + listen(path: string, listeningListener?: () => void): this; + listen(options: ListenOptions, listeningListener?: () => void): this; + listen(handle: any, backlog?: number, listeningListener?: () => void): this; + listen(handle: any, listeningListener?: () => void): this; + close(callback?: (err?: Error) => void): this; + address(): AddressInfo | string | null; + getConnections(cb: (error: Error | null, count: number) => void): void; + ref(): this; + unref(): this; + maxConnections: number; + connections: number; + listening: boolean; + + /** + * events.EventEmitter + * 1. close + * 2. connection + * 3. error + * 4. listening + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connection", listener: (socket: Socket) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "connection", socket: Socket): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "connection", listener: (socket: Socket) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "connection", listener: (socket: Socket) => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connection", listener: (socket: Socket) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + } + + interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number; + } + + interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number; + } + + type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + + function createServer(connectionListener?: (socket: Socket) => void): Server; + function createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void): Server; + function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; + function connect(port: number, host?: string, connectionListener?: () => void): Socket; + function connect(path: string, connectionListener?: () => void): Socket; + function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; + function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; + function createConnection(path: string, connectionListener?: () => void): Socket; + function isIP(input: string): number; + function isIPv4(input: string): boolean; + function isIPv6(input: string): boolean; +} diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts new file mode 100644 index 00000000..37c45a9f --- /dev/null +++ b/node_modules/@types/node/os.d.ts @@ -0,0 +1,263 @@ +declare module "os" { + interface CpuInfo { + model: string; + speed: number; + times: { + user: number; + nice: number; + sys: number; + idle: number; + irq: number; + }; + } + + interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + cidr: string | null; + } + + interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: "IPv4"; + } + + interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: "IPv6"; + scopeid: number; + } + + interface UserInfo { + username: T; + uid: number; + gid: number; + shell: T; + homedir: T; + } + + type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + + function hostname(): string; + function loadavg(): number[]; + function uptime(): number; + function freemem(): number; + function totalmem(): number; + function cpus(): CpuInfo[]; + function type(): string; + function release(): string; + function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; + function homedir(): string; + function userInfo(options: { encoding: 'buffer' }): UserInfo; + function userInfo(options?: { encoding: string }): UserInfo; + const constants: { + UV_UDP_REUSEADDR: number; + // signals: { [key in NodeJS.Signals]: number; }; @todo: change after migration to typescript 2.1 + signals: { + SIGHUP: number; + SIGINT: number; + SIGQUIT: number; + SIGILL: number; + SIGTRAP: number; + SIGABRT: number; + SIGIOT: number; + SIGBUS: number; + SIGFPE: number; + SIGKILL: number; + SIGUSR1: number; + SIGSEGV: number; + SIGUSR2: number; + SIGPIPE: number; + SIGALRM: number; + SIGTERM: number; + SIGCHLD: number; + SIGSTKFLT: number; + SIGCONT: number; + SIGSTOP: number; + SIGTSTP: number; + SIGBREAK: number; + SIGTTIN: number; + SIGTTOU: number; + SIGURG: number; + SIGXCPU: number; + SIGXFSZ: number; + SIGVTALRM: number; + SIGPROF: number; + SIGWINCH: number; + SIGIO: number; + SIGPOLL: number; + SIGLOST: number; + SIGPWR: number; + SIGINFO: number; + SIGSYS: number; + SIGUNUSED: number; + }; + errno: { + E2BIG: number; + EACCES: number; + EADDRINUSE: number; + EADDRNOTAVAIL: number; + EAFNOSUPPORT: number; + EAGAIN: number; + EALREADY: number; + EBADF: number; + EBADMSG: number; + EBUSY: number; + ECANCELED: number; + ECHILD: number; + ECONNABORTED: number; + ECONNREFUSED: number; + ECONNRESET: number; + EDEADLK: number; + EDESTADDRREQ: number; + EDOM: number; + EDQUOT: number; + EEXIST: number; + EFAULT: number; + EFBIG: number; + EHOSTUNREACH: number; + EIDRM: number; + EILSEQ: number; + EINPROGRESS: number; + EINTR: number; + EINVAL: number; + EIO: number; + EISCONN: number; + EISDIR: number; + ELOOP: number; + EMFILE: number; + EMLINK: number; + EMSGSIZE: number; + EMULTIHOP: number; + ENAMETOOLONG: number; + ENETDOWN: number; + ENETRESET: number; + ENETUNREACH: number; + ENFILE: number; + ENOBUFS: number; + ENODATA: number; + ENODEV: number; + ENOENT: number; + ENOEXEC: number; + ENOLCK: number; + ENOLINK: number; + ENOMEM: number; + ENOMSG: number; + ENOPROTOOPT: number; + ENOSPC: number; + ENOSR: number; + ENOSTR: number; + ENOSYS: number; + ENOTCONN: number; + ENOTDIR: number; + ENOTEMPTY: number; + ENOTSOCK: number; + ENOTSUP: number; + ENOTTY: number; + ENXIO: number; + EOPNOTSUPP: number; + EOVERFLOW: number; + EPERM: number; + EPIPE: number; + EPROTO: number; + EPROTONOSUPPORT: number; + EPROTOTYPE: number; + ERANGE: number; + EROFS: number; + ESPIPE: number; + ESRCH: number; + ESTALE: number; + ETIME: number; + ETIMEDOUT: number; + ETXTBSY: number; + EWOULDBLOCK: number; + EXDEV: number; + WSAEINTR: number; + WSAEBADF: number; + WSAEACCES: number; + WSAEFAULT: number; + WSAEINVAL: number; + WSAEMFILE: number; + WSAEWOULDBLOCK: number; + WSAEINPROGRESS: number; + WSAEALREADY: number; + WSAENOTSOCK: number; + WSAEDESTADDRREQ: number; + WSAEMSGSIZE: number; + WSAEPROTOTYPE: number; + WSAENOPROTOOPT: number; + WSAEPROTONOSUPPORT: number; + WSAESOCKTNOSUPPORT: number; + WSAEOPNOTSUPP: number; + WSAEPFNOSUPPORT: number; + WSAEAFNOSUPPORT: number; + WSAEADDRINUSE: number; + WSAEADDRNOTAVAIL: number; + WSAENETDOWN: number; + WSAENETUNREACH: number; + WSAENETRESET: number; + WSAECONNABORTED: number; + WSAECONNRESET: number; + WSAENOBUFS: number; + WSAEISCONN: number; + WSAENOTCONN: number; + WSAESHUTDOWN: number; + WSAETOOMANYREFS: number; + WSAETIMEDOUT: number; + WSAECONNREFUSED: number; + WSAELOOP: number; + WSAENAMETOOLONG: number; + WSAEHOSTDOWN: number; + WSAEHOSTUNREACH: number; + WSAENOTEMPTY: number; + WSAEPROCLIM: number; + WSAEUSERS: number; + WSAEDQUOT: number; + WSAESTALE: number; + WSAEREMOTE: number; + WSASYSNOTREADY: number; + WSAVERNOTSUPPORTED: number; + WSANOTINITIALISED: number; + WSAEDISCON: number; + WSAENOMORE: number; + WSAECANCELLED: number; + WSAEINVALIDPROCTABLE: number; + WSAEINVALIDPROVIDER: number; + WSAEPROVIDERFAILEDINIT: number; + WSASYSCALLFAILURE: number; + WSASERVICE_NOT_FOUND: number; + WSATYPE_NOT_FOUND: number; + WSA_E_NO_MORE: number; + WSA_E_CANCELLED: number; + WSAEREFUSED: number; + }; + priority: { + PRIORITY_LOW: number; + PRIORITY_BELOW_NORMAL: number; + PRIORITY_NORMAL: number; + PRIORITY_ABOVE_NORMAL: number; + PRIORITY_HIGH: number; + PRIORITY_HIGHEST: number; + } + }; + function arch(): string; + function platform(): NodeJS.Platform; + function tmpdir(): string; + const EOL: string; + function endianness(): "BE" | "LE"; + /** + * Gets the priority of a process. + * Defaults to current process. + */ + function getPriority(pid?: number): number; + /** + * Sets the priority of the current process. + * @param priority Must be in range of -20 to 19 + */ + function setPriority(priority: number): void; + /** + * Sets the priority of the process specified process. + * @param priority Must be in range of -20 to 19 + */ + function setPriority(pid: number, priority: number): void; +} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json new file mode 100644 index 00000000..51853751 --- /dev/null +++ b/node_modules/@types/node/package.json @@ -0,0 +1,224 @@ +{ + "_args": [ + [ + "@types/node@12.12.14", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "@types/node@12.12.14", + "_id": "@types/node@12.12.14", + "_inBundle": false, + "_integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==", + "_location": "/@types/node", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/node@12.12.14", + "name": "@types/node", + "escapedName": "@types%2fnode", + "scope": "@types", + "rawSpec": "12.12.14", + "saveSpec": null, + "fetchSpec": "12.12.14" + }, + "_requiredBy": [ + "#DEV:/", + "/@octokit/types" + ], + "_resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.14.tgz", + "_spec": "12.12.14", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, + "contributors": [ + { + "name": "Microsoft TypeScript", + "url": "https://github.com/Microsoft" + }, + { + "name": "DefinitelyTyped", + "url": "https://github.com/DefinitelyTyped" + }, + { + "name": "Alberto Schiabel", + "url": "https://github.com/jkomyno" + }, + { + "name": "Alexander T.", + "url": "https://github.com/a-tarasyuk" + }, + { + "name": "Alvis HT Tang", + "url": "https://github.com/alvis" + }, + { + "name": "Andrew Makarov", + "url": "https://github.com/r3nya" + }, + { + "name": "Benjamin Toueg", + "url": "https://github.com/btoueg" + }, + { + "name": "Bruno Scheufler", + "url": "https://github.com/brunoscheufler" + }, + { + "name": "Chigozirim C.", + "url": "https://github.com/smac89" + }, + { + "name": "Christian Vaagland Tellnes", + "url": "https://github.com/tellnes" + }, + { + "name": "David Junger", + "url": "https://github.com/touffy" + }, + { + "name": "Deividas Bakanas", + "url": "https://github.com/DeividasBakanas" + }, + { + "name": "Eugene Y. Q. Shen", + "url": "https://github.com/eyqs" + }, + { + "name": "Flarna", + "url": "https://github.com/Flarna" + }, + { + "name": "Hannes Magnusson", + "url": "https://github.com/Hannes-Magnusson-CK" + }, + { + "name": "Hoàng Văn Khải", + "url": "https://github.com/KSXGitHub" + }, + { + "name": "Huw", + "url": "https://github.com/hoo29" + }, + { + "name": "Kelvin Jin", + "url": "https://github.com/kjin" + }, + { + "name": "Klaus Meinhardt", + "url": "https://github.com/ajafff" + }, + { + "name": "Lishude", + "url": "https://github.com/islishude" + }, + { + "name": "Mariusz Wiktorczyk", + "url": "https://github.com/mwiktorczyk" + }, + { + "name": "Mohsen Azimi", + "url": "https://github.com/mohsen1" + }, + { + "name": "Nicolas Even", + "url": "https://github.com/n-e" + }, + { + "name": "Nicolas Voigt", + "url": "https://github.com/octo-sniffle" + }, + { + "name": "Nikita Galkin", + "url": "https://github.com/galkin" + }, + { + "name": "Parambir Singh", + "url": "https://github.com/parambirs" + }, + { + "name": "Sebastian Silbermann", + "url": "https://github.com/eps1lon" + }, + { + "name": "Simon Schick", + "url": "https://github.com/SimonSchick" + }, + { + "name": "Thomas den Hollander", + "url": "https://github.com/ThomasdenH" + }, + { + "name": "Wilco Bakker", + "url": "https://github.com/WilcoBakker" + }, + { + "name": "wwwy3y3", + "url": "https://github.com/wwwy3y3" + }, + { + "name": "Zane Hannan AU", + "url": "https://github.com/ZaneHannanAU" + }, + { + "name": "Samuel Ainsworth", + "url": "https://github.com/samuela" + }, + { + "name": "Kyle Uehlein", + "url": "https://github.com/kuehlein" + }, + { + "name": "Jordi Oliveras Rovira", + "url": "https://github.com/j-oliveras" + }, + { + "name": "Thanik Bhongbhibhat", + "url": "https://github.com/bhongy" + }, + { + "name": "Marcin Kopacz", + "url": "https://github.com/chyzwar" + }, + { + "name": "Trivikram Kamat", + "url": "https://github.com/trivikr" + }, + { + "name": "Minh Son Nguyen", + "url": "https://github.com/nguymin4" + }, + { + "name": "Junxiao Shi", + "url": "https://github.com/yoursunny" + }, + { + "name": "Ilia Baryshnikov", + "url": "https://github.com/qwelias" + } + ], + "dependencies": {}, + "description": "TypeScript definitions for Node.js", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", + "main": "", + "name": "@types/node", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node" + }, + "scripts": {}, + "typeScriptVersion": "2.8", + "types": "index.d.ts", + "typesPublisherContentHash": "305a8ff81632f0e70287898475e87d6aedbd683a5e37cb775f9ea845625cfa06", + "typesVersions": { + ">=3.2.0-0": { + "*": [ + "ts3.2/*" + ] + } + }, + "version": "12.12.14" +} diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts new file mode 100644 index 00000000..2f4a5491 --- /dev/null +++ b/node_modules/@types/node/path.d.ts @@ -0,0 +1,159 @@ +declare module "path" { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + interface FormatInputPathObject { + /** + * The root of the path such as '/' or 'c:\' + */ + root?: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir?: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base?: string; + /** + * The file extension (if any) such as '.html' + */ + ext?: string; + /** + * The file name without extension (if any) such as 'index' + */ + name?: string; + } + + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. + * + * @param p string path to normalize. + */ + function normalize(p: string): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths paths to join. + */ + function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, + * until an absolute path is found. If after using all {from} paths still no absolute path is found, + * the current working directory is used as well. The resulting path is normalized, + * and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param pathSegments string paths to join. Non-string arguments are ignored. + */ + function resolve(...pathSegments: string[]): string; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * @param path path to test. + */ + function isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to}. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + */ + function relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param p the path to evaluate. + */ + function dirname(p: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param p the path to evaluate. + * @param ext optionally, an extension to remove from the result. + */ + function basename(p: string, ext?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string + * + * @param p the path to evaluate. + */ + function extname(p: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + const sep: '\\' | '/'; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + const delimiter: ';' | ':'; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param pathString path to evaluate. + */ + function parse(pathString: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathString path to evaluate. + */ + function format(pathObject: FormatInputPathObject): string; + + namespace posix { + function normalize(p: string): string; + function join(...paths: string[]): string; + function resolve(...pathSegments: string[]): string; + function isAbsolute(p: string): boolean; + function relative(from: string, to: string): string; + function dirname(p: string): string; + function basename(p: string, ext?: string): string; + function extname(p: string): string; + const sep: string; + const delimiter: string; + function parse(p: string): ParsedPath; + function format(pP: FormatInputPathObject): string; + } + + namespace win32 { + function normalize(p: string): string; + function join(...paths: string[]): string; + function resolve(...pathSegments: string[]): string; + function isAbsolute(p: string): boolean; + function relative(from: string, to: string): string; + function dirname(p: string): string; + function basename(p: string, ext?: string): string; + function extname(p: string): string; + const sep: string; + const delimiter: string; + function parse(p: string): ParsedPath; + function format(pP: FormatInputPathObject): string; + } +} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts new file mode 100644 index 00000000..bf44d446 --- /dev/null +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -0,0 +1,304 @@ +declare module "perf_hooks" { + import { AsyncResource } from "async_hooks"; + + interface PerformanceEntry { + /** + * The total number of milliseconds elapsed for this entry. + * This value will not be meaningful for all Performance Entry types. + */ + readonly duration: number; + + /** + * The name of the performance entry. + */ + readonly name: string; + + /** + * The high resolution millisecond timestamp marking the starting time of the Performance Entry. + */ + readonly startTime: number; + + /** + * The type of the performance entry. + * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'. + */ + readonly entryType: string; + + /** + * When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies + * the type of garbage collection operation that occurred. + * The value may be one of perf_hooks.constants. + */ + readonly kind?: number; + } + + interface PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process completed bootstrap. + */ + readonly bootstrapComplete: number; + + /** + * The high resolution millisecond timestamp at which cluster processing ended. + */ + readonly clusterSetupEnd: number; + + /** + * The high resolution millisecond timestamp at which cluster processing started. + */ + readonly clusterSetupStart: number; + + /** + * The high resolution millisecond timestamp at which the Node.js event loop exited. + */ + readonly loopExit: number; + + /** + * The high resolution millisecond timestamp at which the Node.js event loop started. + */ + readonly loopStart: number; + + /** + * The high resolution millisecond timestamp at which main module load ended. + */ + readonly moduleLoadEnd: number; + + /** + * The high resolution millisecond timestamp at which main module load started. + */ + readonly moduleLoadStart: number; + + /** + * The high resolution millisecond timestamp at which the Node.js process was initialized. + */ + readonly nodeStart: number; + + /** + * The high resolution millisecond timestamp at which preload module load ended. + */ + readonly preloadModuleLoadEnd: number; + + /** + * The high resolution millisecond timestamp at which preload module load started. + */ + readonly preloadModuleLoadStart: number; + + /** + * The high resolution millisecond timestamp at which third_party_main processing ended. + */ + readonly thirdPartyMainEnd: number; + + /** + * The high resolution millisecond timestamp at which third_party_main processing started. + */ + readonly thirdPartyMainStart: number; + + /** + * The high resolution millisecond timestamp at which the V8 platform was initialized. + */ + readonly v8Start: number; + } + + interface Performance { + /** + * If name is not provided, removes all PerformanceFunction objects from the Performance Timeline. + * If name is provided, removes entries with name. + * @param name + */ + clearFunctions(name?: string): void; + + /** + * If name is not provided, removes all PerformanceMark objects from the Performance Timeline. + * If name is provided, removes only the named mark. + * @param name + */ + clearMarks(name?: string): void; + + /** + * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline. + * If name is provided, removes only objects whose performanceEntry.name matches name. + */ + clearMeasures(name?: string): void; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. + * @return list of all PerformanceEntry objects + */ + getEntries(): PerformanceEntry[]; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. + * @param name + * @param type + * @return list of all PerformanceEntry objects + */ + getEntriesByName(name: string, type?: string): PerformanceEntry[]; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.entryType is equal to type. + * @param type + * @return list of all PerformanceEntry objects + */ + getEntriesByType(type: string): PerformanceEntry[]; + + /** + * Creates a new PerformanceMark entry in the Performance Timeline. + * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark', + * and whose performanceEntry.duration is always 0. + * Performance marks are used to mark specific significant moments in the Performance Timeline. + * @param name + */ + mark(name?: string): void; + + /** + * Creates a new PerformanceMeasure entry in the Performance Timeline. + * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', + * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark. + * + * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify + * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, + * then startMark is set to timeOrigin by default. + * + * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp + * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown. + * @param name + * @param startMark + * @param endMark + */ + measure(name: string, startMark: string, endMark: string): void; + + /** + * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones. + */ + readonly nodeTiming: PerformanceNodeTiming; + + /** + * @return the current high resolution millisecond timestamp + */ + now(): number; + + /** + * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured. + */ + readonly timeOrigin: number; + + /** + * Wraps a function within a new function that measures the running time of the wrapped function. + * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed. + * @param fn + */ + timerify any>(fn: T): T; + } + + interface PerformanceObserverEntryList { + /** + * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. + */ + getEntries(): PerformanceEntry[]; + + /** + * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. + */ + getEntriesByName(name: string, type?: string): PerformanceEntry[]; + + /** + * @return Returns a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.entryType is equal to type. + */ + getEntriesByType(type: string): PerformanceEntry[]; + } + + type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; + + class PerformanceObserver extends AsyncResource { + constructor(callback: PerformanceObserverCallback); + + /** + * Disconnects the PerformanceObserver instance from all notifications. + */ + disconnect(): void; + + /** + * Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes. + * When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance. + * Property buffered defaults to false. + * @param options + */ + observe(options: { entryTypes: string[], buffered?: boolean }): void; + } + + namespace constants { + const NODE_PERFORMANCE_GC_MAJOR: number; + const NODE_PERFORMANCE_GC_MINOR: number; + const NODE_PERFORMANCE_GC_INCREMENTAL: number; + const NODE_PERFORMANCE_GC_WEAKCB: number; + } + + const performance: Performance; + + interface EventLoopMonitorOptions { + /** + * The sampling rate in milliseconds. + * Must be greater than zero. + * @default 10 + */ + resolution?: number; + } + + interface EventLoopDelayMonitor { + /** + * Enables the event loop delay sample timer. Returns `true` if the timer was started, `false` if it was already started. + */ + enable(): boolean; + /** + * Disables the event loop delay sample timer. Returns `true` if the timer was stopped, `false` if it was already stopped. + */ + disable(): boolean; + + /** + * Resets the collected histogram data. + */ + reset(): void; + + /** + * Returns the value at the given percentile. + * @param percentile A percentile value between 1 and 100. + */ + percentile(percentile: number): number; + + /** + * A `Map` object detailing the accumulated percentile distribution. + */ + readonly percentiles: Map; + + /** + * The number of times the event loop delay exceeded the maximum 1 hour eventloop delay threshold. + */ + readonly exceeds: number; + + /** + * The minimum recorded event loop delay. + */ + readonly min: number; + + /** + * The maximum recorded event loop delay. + */ + readonly max: number; + + /** + * The mean of the recorded event loop delays. + */ + readonly mean: number; + + /** + * The standard deviation of the recorded event loop delays. + */ + readonly stddev: number; + } + + function monitorEventLoopDelay(options?: EventLoopMonitorOptions): EventLoopDelayMonitor; +} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts new file mode 100644 index 00000000..d007d4e0 --- /dev/null +++ b/node_modules/@types/node/process.d.ts @@ -0,0 +1,15 @@ +declare module "process" { + import * as tty from "tty"; + + global { + namespace NodeJS { + // this namespace merge is here because these are specifically used + // as the type for process.stdin, process.stdout, and process.stderr. + // they can't live in tty.d.ts because we need to disambiguate the imported name. + interface ReadStream extends tty.ReadStream {} + interface WriteStream extends tty.WriteStream {} + } + } + + export = process; +} diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts new file mode 100644 index 00000000..75d2811d --- /dev/null +++ b/node_modules/@types/node/punycode.d.ts @@ -0,0 +1,12 @@ +declare module "punycode" { + function decode(string: string): string; + function encode(string: string): string; + function toUnicode(domain: string): string; + function toASCII(domain: string): string; + const ucs2: ucs2; + interface ucs2 { + decode(string: string): number[]; + encode(codePoints: number[]): string; + } + const version: string; +} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts new file mode 100644 index 00000000..a61269d2 --- /dev/null +++ b/node_modules/@types/node/querystring.d.ts @@ -0,0 +1,29 @@ +declare module "querystring" { + interface StringifyOptions { + encodeURIComponent?: (str: string) => string; + } + + interface ParseOptions { + maxKeys?: number; + decodeURIComponent?: (str: string) => string; + } + + interface ParsedUrlQuery { [key: string]: string | string[]; } + + interface ParsedUrlQueryInput { + [key: string]: NodeJS.PoorMansUnknown; + } + + function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; + function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + /** + * The querystring.encode() function is an alias for querystring.stringify(). + */ + const encode: typeof stringify; + /** + * The querystring.decode() function is an alias for querystring.parse(). + */ + const decode: typeof parse; + function escape(str: string): string; + function unescape(str: string): string; +} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts new file mode 100644 index 00000000..6cb572e3 --- /dev/null +++ b/node_modules/@types/node/readline.d.ts @@ -0,0 +1,150 @@ +declare module "readline" { + import * as events from "events"; + import * as stream from "stream"; + + interface Key { + sequence?: string; + name?: string; + ctrl?: boolean; + meta?: boolean; + shift?: boolean; + } + + class Interface extends events.EventEmitter { + readonly terminal: boolean; + + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface + */ + protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean); + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface + */ + protected constructor(options: ReadLineOptions); + + setPrompt(prompt: string): void; + prompt(preserveCursor?: boolean): void; + question(query: string, callback: (answer: string) => void): void; + pause(): this; + resume(): this; + close(): void; + write(data: string | Buffer, key?: Key): void; + + /** + * events.EventEmitter + * 1. close + * 2. line + * 3. pause + * 4. resume + * 5. SIGCONT + * 6. SIGINT + * 7. SIGTSTP + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "line", listener: (input: string) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: "SIGCONT", listener: () => void): this; + addListener(event: "SIGINT", listener: () => void): this; + addListener(event: "SIGTSTP", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "line", input: string): boolean; + emit(event: "pause"): boolean; + emit(event: "resume"): boolean; + emit(event: "SIGCONT"): boolean; + emit(event: "SIGINT"): boolean; + emit(event: "SIGTSTP"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "line", listener: (input: string) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: "SIGCONT", listener: () => void): this; + on(event: "SIGINT", listener: () => void): this; + on(event: "SIGTSTP", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "line", listener: (input: string) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: "SIGCONT", listener: () => void): this; + once(event: "SIGINT", listener: () => void): this; + once(event: "SIGTSTP", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "line", listener: (input: string) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: "SIGCONT", listener: () => void): this; + prependListener(event: "SIGINT", listener: () => void): this; + prependListener(event: "SIGTSTP", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "line", listener: (input: string) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: "SIGCONT", listener: () => void): this; + prependOnceListener(event: "SIGINT", listener: () => void): this; + prependOnceListener(event: "SIGTSTP", listener: () => void): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + type ReadLine = Interface; // type forwarded for backwards compatiblity + + type Completer = (line: string) => CompleterResult; + type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any; + + type CompleterResult = [string[], string]; + + interface ReadLineOptions { + input: NodeJS.ReadableStream; + output?: NodeJS.WritableStream; + completer?: Completer | AsyncCompleter; + terminal?: boolean; + historySize?: number; + prompt?: string; + crlfDelay?: number; + removeHistoryDuplicates?: boolean; + } + + function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface; + function createInterface(options: ReadLineOptions): Interface; + function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; + + type Direction = -1 | 0 | 1; + + /** + * Clears the current line of this WriteStream in a direction identified by `dir`. + */ + function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; + /** + * Clears this `WriteStream` from the current cursor down. + */ + function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; + /** + * Moves this WriteStream's cursor to the specified position. + */ + function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; + /** + * Moves this WriteStream's cursor relative to its current position. + */ + function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; +} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts new file mode 100644 index 00000000..9496fcdf --- /dev/null +++ b/node_modules/@types/node/repl.d.ts @@ -0,0 +1,382 @@ +declare module "repl" { + import { Interface, Completer, AsyncCompleter } from "readline"; + import { Context } from "vm"; + import { InspectOptions } from "util"; + + interface ReplOptions { + /** + * The input prompt to display. + * Default: `"> "` + */ + prompt?: string; + /** + * The `Readable` stream from which REPL input will be read. + * Default: `process.stdin` + */ + input?: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + * Default: `process.stdout` + */ + output?: NodeJS.WritableStream; + /** + * If `true`, specifies that the output should be treated as a TTY terminal, and have + * ANSI/VT100 escape codes written to it. + * Default: checking the value of the `isTTY` property on the output stream upon + * instantiation. + */ + terminal?: boolean; + /** + * The function to be used when evaluating each given line of input. + * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can + * error with `repl.Recoverable` to indicate the input was incomplete and prompt for + * additional lines. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions + */ + eval?: REPLEval; + /** + * If `true`, specifies that the default `writer` function should include ANSI color + * styling to REPL output. If a custom `writer` function is provided then this has no + * effect. + * Default: the REPL instance's `terminal` value. + */ + useColors?: boolean; + /** + * If `true`, specifies that the default evaluation function will use the JavaScript + * `global` as the context as opposed to creating a new separate context for the REPL + * instance. The node CLI REPL sets this value to `true`. + * Default: `false`. + */ + useGlobal?: boolean; + /** + * If `true`, specifies that the default writer will not output the return value of a + * command if it evaluates to `undefined`. + * Default: `false`. + */ + ignoreUndefined?: boolean; + /** + * The function to invoke to format the output of each command before writing to `output`. + * Default: a wrapper for `util.inspect`. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output + */ + writer?: REPLWriter; + /** + * An optional function used for custom Tab auto completion. + * + * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function + */ + completer?: Completer | AsyncCompleter; + /** + * A flag that specifies whether the default evaluator executes all JavaScript commands in + * strict mode or default (sloppy) mode. + * Accepted values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + /** + * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is + * pressed. This cannot be used together with a custom `eval` function. + * Default: `false`. + */ + breakEvalOnSigint?: boolean; + } + + type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void; + type REPLWriter = (this: REPLServer, obj: any) => string; + + /** + * This is the default "writer" value, if none is passed in the REPL options, + * and it can be overridden by custom print functions. + */ + const writer: REPLWriter & { options: InspectOptions }; + + type REPLCommandAction = (this: REPLServer, text: string) => void; + + interface REPLCommand { + /** + * Help text to be displayed when `.help` is entered. + */ + help?: string; + /** + * The function to execute, optionally accepting a single string argument. + */ + action: REPLCommandAction; + } + + /** + * Provides a customizable Read-Eval-Print-Loop (REPL). + * + * Instances of `repl.REPLServer` will accept individual lines of user input, evaluate those + * according to a user-defined evaluation function, then output the result. Input and output + * may be from `stdin` and `stdout`, respectively, or may be connected to any Node.js `stream`. + * + * Instances of `repl.REPLServer` support automatic completion of inputs, simplistic Emacs-style + * line editing, multi-line inputs, ANSI-styled output, saving and restoring current REPL session + * state, error recovery, and customizable evaluation functions. + * + * Instances of `repl.REPLServer` are created using the `repl.start()` method and _should not_ + * be created directly using the JavaScript `new` keyword. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_repl + */ + class REPLServer extends Interface { + /** + * The `vm.Context` provided to the `eval` function to be used for JavaScript + * evaluation. + */ + readonly context: Context; + /** + * The `Readable` stream from which REPL input will be read. + */ + readonly inputStream: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + */ + readonly outputStream: NodeJS.WritableStream; + /** + * The commands registered via `replServer.defineCommand()`. + */ + readonly commands: { readonly [name: string]: REPLCommand | undefined }; + /** + * A value indicating whether the REPL is currently in "editor mode". + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys + */ + readonly editorMode: boolean; + /** + * A value indicating whether the `_` variable has been assigned. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreAssigned: boolean; + /** + * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly last: any; + /** + * A value indicating whether the `_error` variable has been assigned. + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreErrAssigned: boolean; + /** + * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly lastError: any; + /** + * Specified in the REPL options, this is the function to be used when evaluating each + * given line of input. If not specified in the REPL options, this is an async wrapper + * for the JavaScript `eval()` function. + */ + readonly eval: REPLEval; + /** + * Specified in the REPL options, this is a value indicating whether the default + * `writer` function should include ANSI color styling to REPL output. + */ + readonly useColors: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `eval` + * function will use the JavaScript `global` as the context as opposed to creating a new + * separate context for the REPL instance. + */ + readonly useGlobal: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `writer` + * function should output the result of a command if it evaluates to `undefined`. + */ + readonly ignoreUndefined: boolean; + /** + * Specified in the REPL options, this is the function to invoke to format the output of + * each command before writing to `outputStream`. If not specified in the REPL options, + * this will be a wrapper for `util.inspect`. + */ + readonly writer: REPLWriter; + /** + * Specified in the REPL options, this is the function to use for custom Tab auto-completion. + */ + readonly completer: Completer | AsyncCompleter; + /** + * Specified in the REPL options, this is a flag that specifies whether the default `eval` + * function should execute all JavaScript commands in strict mode or default (sloppy) mode. + * Possible values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + + /** + * NOTE: According to the documentation: + * + * > Instances of `repl.REPLServer` are created using the `repl.start()` method and + * > _should not_ be created directly using the JavaScript `new` keyword. + * + * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver + */ + private constructor(); + + /** + * Used to add new `.`-prefixed commands to the REPL instance. Such commands are invoked + * by typing a `.` followed by the `keyword`. + * + * @param keyword The command keyword (_without_ a leading `.` character). + * @param cmd The function to invoke when the command is processed. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_replserver_definecommand_keyword_cmd + */ + defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; + /** + * Readies the REPL instance for input from the user, printing the configured `prompt` to a + * new line in the `output` and resuming the `input` to accept new input. + * + * When multi-line input is being entered, an ellipsis is printed rather than the 'prompt'. + * + * This method is primarily intended to be called from within the action function for + * commands registered using the `replServer.defineCommand()` method. + * + * @param preserveCursor When `true`, the cursor placement will not be reset to `0`. + */ + displayPrompt(preserveCursor?: boolean): void; + /** + * Clears any command that has been buffered but not yet executed. + * + * This method is primarily intended to be called from within the action function for + * commands registered using the `replServer.defineCommand()` method. + * + * @since v9.0.0 + */ + clearBufferedCommand(): void; + + /** + * Initializes a history log file for the REPL instance. When executing the + * Node.js binary and using the command line REPL, a history file is initialized + * by default. However, this is not the case when creating a REPL + * programmatically. Use this method to initialize a history log file when working + * with REPL instances programmatically. + * @param path The path to the history file + */ + setupHistory(path: string, cb: (err: Error | null, repl: this) => void): void; + + /** + * events.EventEmitter + * 1. close - inherited from `readline.Interface` + * 2. line - inherited from `readline.Interface` + * 3. pause - inherited from `readline.Interface` + * 4. resume - inherited from `readline.Interface` + * 5. SIGCONT - inherited from `readline.Interface` + * 6. SIGINT - inherited from `readline.Interface` + * 7. SIGTSTP - inherited from `readline.Interface` + * 8. exit + * 9. reset + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "line", listener: (input: string) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: "SIGCONT", listener: () => void): this; + addListener(event: "SIGINT", listener: () => void): this; + addListener(event: "SIGTSTP", listener: () => void): this; + addListener(event: "exit", listener: () => void): this; + addListener(event: "reset", listener: (context: Context) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "line", input: string): boolean; + emit(event: "pause"): boolean; + emit(event: "resume"): boolean; + emit(event: "SIGCONT"): boolean; + emit(event: "SIGINT"): boolean; + emit(event: "SIGTSTP"): boolean; + emit(event: "exit"): boolean; + emit(event: "reset", context: Context): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "line", listener: (input: string) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: "SIGCONT", listener: () => void): this; + on(event: "SIGINT", listener: () => void): this; + on(event: "SIGTSTP", listener: () => void): this; + on(event: "exit", listener: () => void): this; + on(event: "reset", listener: (context: Context) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "line", listener: (input: string) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: "SIGCONT", listener: () => void): this; + once(event: "SIGINT", listener: () => void): this; + once(event: "SIGTSTP", listener: () => void): this; + once(event: "exit", listener: () => void): this; + once(event: "reset", listener: (context: Context) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "line", listener: (input: string) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: "SIGCONT", listener: () => void): this; + prependListener(event: "SIGINT", listener: () => void): this; + prependListener(event: "SIGTSTP", listener: () => void): this; + prependListener(event: "exit", listener: () => void): this; + prependListener(event: "reset", listener: (context: Context) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "line", listener: (input: string) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: "SIGCONT", listener: () => void): this; + prependOnceListener(event: "SIGINT", listener: () => void): this; + prependOnceListener(event: "SIGTSTP", listener: () => void): this; + prependOnceListener(event: "exit", listener: () => void): this; + prependOnceListener(event: "reset", listener: (context: Context) => void): this; + } + + /** + * A flag passed in the REPL options. Evaluates expressions in sloppy mode. + */ + const REPL_MODE_SLOPPY: symbol; // TODO: unique symbol + + /** + * A flag passed in the REPL options. Evaluates expressions in strict mode. + * This is equivalent to prefacing every repl statement with `'use strict'`. + */ + const REPL_MODE_STRICT: symbol; // TODO: unique symbol + + /** + * Creates and starts a `repl.REPLServer` instance. + * + * @param options The options for the `REPLServer`. If `options` is a string, then it specifies + * the input prompt. + */ + function start(options?: string | ReplOptions): REPLServer; + + /** + * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors + */ + class Recoverable extends SyntaxError { + err: Error; + + constructor(err: Error); + } +} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts new file mode 100644 index 00000000..2a0895b0 --- /dev/null +++ b/node_modules/@types/node/stream.d.ts @@ -0,0 +1,319 @@ +declare module "stream" { + import * as events from "events"; + + class internal extends events.EventEmitter { + pipe(destination: T, options?: { end?: boolean; }): T; + } + + namespace internal { + class Stream extends internal { } + + interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + read?(this: Readable, size: number): void; + destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void; + autoDestroy?: boolean; + } + + class Readable extends Stream implements NodeJS.ReadableStream { + /** + * A utility method for creating Readable Streams out of iterators. + */ + static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; + + readable: boolean; + readonly readableHighWaterMark: number; + readonly readableLength: number; + readonly readableObjectMode: boolean; + destroyed: boolean; + constructor(opts?: ReadableOptions); + _read(size: number): void; + read(size?: number): any; + setEncoding(encoding: string): this; + pause(): this; + resume(): this; + isPaused(): boolean; + unpipe(destination?: NodeJS.WritableStream): this; + unshift(chunk: any, encoding?: BufferEncoding): void; + wrap(oldStream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: string): boolean; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + destroy(error?: Error): void; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. data + * 3. end + * 4. readable + * 5. error + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: any) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "data", chunk: any): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: any) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: any) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: any) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: any) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: any) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + interface WritableOptions { + highWaterMark?: number; + decodeStrings?: boolean; + defaultEncoding?: string; + objectMode?: boolean; + emitClose?: boolean; + write?(this: Writable, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Writable, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void; + final?(this: Writable, callback: (error?: Error | null) => void): void; + autoDestroy?: boolean; + } + + class Writable extends Stream implements NodeJS.WritableStream { + readonly writable: boolean; + readonly writableEnded: boolean; + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + readonly writableObjectMode: boolean; + destroyed: boolean; + constructor(opts?: WritableOptions); + _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, encoding: string, cb?: (error: Error | null | undefined) => void): boolean; + setDefaultEncoding(encoding: string): this; + end(cb?: () => void): void; + end(chunk: any, cb?: () => void): void; + end(chunk: any, encoding: string, cb?: () => void): void; + cork(): void; + uncork(): void; + destroy(error?: Error): void; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. drain + * 3. error + * 4. finish + * 5. pipe + * 6. unpipe + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: Readable) => void): this; + addListener(event: "unpipe", listener: (src: Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "drain"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: Readable): boolean; + emit(event: "unpipe", src: Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: Readable) => void): this; + on(event: "unpipe", listener: (src: Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: Readable) => void): this; + once(event: "unpipe", listener: (src: Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: Readable) => void): this; + prependListener(event: "unpipe", listener: (src: Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "pipe", listener: (src: Readable) => void): this; + removeListener(event: "unpipe", listener: (src: Readable) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean; + readableObjectMode?: boolean; + writableObjectMode?: boolean; + read?(this: Duplex, size: number): void; + write?(this: Duplex, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + final?(this: Duplex, callback: (error?: Error | null) => void): void; + destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void; + } + + // Note: Duplex extends both Readable and Writable. + class Duplex extends Readable implements Writable { + readonly writable: boolean; + readonly writableEnded: boolean; + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + readonly writableObjectMode: boolean; + constructor(opts?: DuplexOptions); + _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + setDefaultEncoding(encoding: string): this; + end(cb?: () => void): void; + end(chunk: any, cb?: () => void): void; + end(chunk: any, encoding?: string, cb?: () => void): void; + cork(): void; + uncork(): void; + } + + type TransformCallback = (error?: Error | null, data?: any) => void; + + interface TransformOptions extends DuplexOptions { + read?(this: Transform, size: number): void; + write?(this: Transform, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Transform, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + final?(this: Transform, callback: (error?: Error | null) => void): void; + destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void; + transform?(this: Transform, chunk: any, encoding: string, callback: TransformCallback): void; + flush?(this: Transform, callback: TransformCallback): void; + } + + class Transform extends Duplex { + constructor(opts?: TransformOptions); + _transform(chunk: any, encoding: string, callback: TransformCallback): void; + _flush(callback: TransformCallback): void; + } + + class PassThrough extends Transform { } + + function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void; + namespace finished { + function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream): Promise; + } + + function pipeline(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T; + function pipeline(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream, + stream3: NodeJS.ReadWriteStream, + stream4: T, + callback?: (err: NodeJS.ErrnoException | null) => void, + ): T; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream, + stream3: NodeJS.ReadWriteStream, + stream4: NodeJS.ReadWriteStream, + stream5: T, + callback?: (err: NodeJS.ErrnoException | null) => void, + ): T; + function pipeline(streams: Array, callback?: (err: NodeJS.ErrnoException | null) => void): NodeJS.WritableStream; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array void)>, + ): NodeJS.WritableStream; + namespace pipeline { + function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise; + function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.WritableStream): Promise; + function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.ReadWriteStream, stream4: NodeJS.WritableStream): Promise; + function __promisify__( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream, + stream3: NodeJS.ReadWriteStream, + stream4: NodeJS.ReadWriteStream, + stream5: NodeJS.WritableStream, + ): Promise; + function __promisify__(streams: Array): Promise; + function __promisify__( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array, + ): Promise; + } + + interface Pipe { + close(): void; + hasRef(): boolean; + ref(): void; + unref(): void; + } + } + + export = internal; +} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts new file mode 100644 index 00000000..fe0e0b4d --- /dev/null +++ b/node_modules/@types/node/string_decoder.d.ts @@ -0,0 +1,7 @@ +declare module "string_decoder" { + class StringDecoder { + constructor(encoding?: string); + write(buffer: Buffer): string; + end(buffer?: Buffer): string; + } +} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts new file mode 100644 index 00000000..e64a6735 --- /dev/null +++ b/node_modules/@types/node/timers.d.ts @@ -0,0 +1,16 @@ +declare module "timers" { + function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; + namespace setTimeout { + function __promisify__(ms: number): Promise; + function __promisify__(ms: number, value: T): Promise; + } + function clearTimeout(timeoutId: NodeJS.Timeout): void; + function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; + function clearInterval(intervalId: NodeJS.Timeout): void; + function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; + namespace setImmediate { + function __promisify__(): Promise; + function __promisify__(value: T): Promise; + } + function clearImmediate(immediateId: NodeJS.Immediate): void; +} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts new file mode 100644 index 00000000..2ff817b0 --- /dev/null +++ b/node_modules/@types/node/tls.d.ts @@ -0,0 +1,418 @@ +declare module "tls" { + import * as crypto from "crypto"; + import * as dns from "dns"; + import * as net from "net"; + import * as stream from "stream"; + + const CLIENT_RENEG_LIMIT: number; + const CLIENT_RENEG_WINDOW: number; + + interface Certificate { + /** + * Country code. + */ + C: string; + /** + * Street. + */ + ST: string; + /** + * Locality. + */ + L: string; + /** + * Organization. + */ + O: string; + /** + * Organizational unit. + */ + OU: string; + /** + * Common name. + */ + CN: string; + } + + interface PeerCertificate { + subject: Certificate; + issuer: Certificate; + subjectaltname: string; + infoAccess: { [index: string]: string[] | undefined }; + modulus: string; + exponent: string; + valid_from: string; + valid_to: string; + fingerprint: string; + ext_key_usage: string[]; + serialNumber: string; + raw: Buffer; + } + + interface DetailedPeerCertificate extends PeerCertificate { + issuerCertificate: DetailedPeerCertificate; + } + + interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + } + + interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { + /** + * If true the TLS socket will be instantiated in server-mode. + * Defaults to false. + */ + isServer?: boolean; + /** + * An optional net.Server instance. + */ + server?: net.Server; + + /** + * An optional Buffer instance containing a TLS session. + */ + session?: Buffer; + /** + * If true, specifies that the OCSP status request extension will be + * added to the client hello and an 'OCSPResponse' event will be + * emitted on the socket before establishing a secure communication + */ + requestOCSP?: boolean; + } + + class TLSSocket extends net.Socket { + /** + * Construct a new tls.TLSSocket object from an existing TCP socket. + */ + constructor(socket: net.Socket, options?: TLSSocketOptions); + + /** + * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. + */ + authorized: boolean; + /** + * The reason why the peer's certificate has not been verified. + * This property becomes available only when tlsSocket.authorized === false. + */ + authorizationError: Error; + /** + * Static boolean value, always true. + * May be used to distinguish TLS sockets from regular ones. + */ + encrypted: boolean; + + /** + * String containing the selected ALPN protocol. + * When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false. + */ + alpnProtocol?: string; + + /** + * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. + * @returns Returns an object representing the cipher name + * and the SSL/TLS protocol version of the current connection. + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object representing the peer's certificate. + * The returned object has some properties corresponding to the field of the certificate. + * If detailed argument is true the full chain with issuer property will be returned, + * if false only the top certificate without issuer property. + * If the peer does not provide a certificate, it returns null or an empty object. + * @param detailed - If true; the full chain with issuer property will be returned. + * @returns An object representing the peer's certificate. + */ + getPeerCertificate(detailed: true): DetailedPeerCertificate; + getPeerCertificate(detailed?: false): PeerCertificate; + getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; + /** + * Returns a string containing the negotiated SSL/TLS protocol version of the current connection. + * The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process. + * The value `null` will be returned for server sockets or disconnected client sockets. + * See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information. + * @returns negotiated SSL/TLS protocol version of the current connection + */ + getProtocol(): string | null; + /** + * Could be used to speed up handshake establishment when reconnecting to the server. + * @returns ASN.1 encoded TLS session or undefined if none was negotiated. + */ + getSession(): Buffer | undefined; + /** + * NOTE: Works only with client TLS sockets. + * Useful only for debugging, for session reuse provide session option to tls.connect(). + * @returns TLS session ticket or undefined if none was negotiated. + */ + getTLSTicket(): Buffer | undefined; + /** + * Initiate TLS renegotiation process. + * + * NOTE: Can be used to request peer's certificate after the secure connection has been established. + * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. + * @param options - The options may contain the following fields: rejectUnauthorized, + * requestCert (See tls.createServer() for details). + * @param callback - callback(err) will be executed with null as err, once the renegotiation + * is successfully completed. + * @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated. + */ + renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): undefined | boolean; + /** + * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by + * the TLS layer until the entire fragment is received and its integrity is verified; + * large fragments can span multiple roundtrips, and their processing can be delayed due to packet + * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, + * which may decrease overall server throughput. + * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * @returns Returns true on success, false otherwise. + */ + setMaxSendFragment(size: number): boolean; + + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * + * Note: The format of the output is identical to the output of `openssl s_client + * -trace` or `openssl s_server -trace`. While it is produced by OpenSSL's + * `SSL_trace()` function, the format is undocumented, can change without notice, + * and should not be relied on. + */ + enableTrace(): void; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + addListener(event: "secureConnect", listener: () => void): this; + addListener(event: "session", listener: (session: Buffer) => void): this; + addListener(event: "keylog", listener: (line: Buffer) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "OCSPResponse", response: Buffer): boolean; + emit(event: "secureConnect"): boolean; + emit(event: "session", session: Buffer): boolean; + emit(event: "keylog", line: Buffer): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "OCSPResponse", listener: (response: Buffer) => void): this; + on(event: "secureConnect", listener: () => void): this; + on(event: "session", listener: (session: Buffer) => void): this; + on(event: "keylog", listener: (line: Buffer) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "OCSPResponse", listener: (response: Buffer) => void): this; + once(event: "secureConnect", listener: () => void): this; + once(event: "session", listener: (session: Buffer) => void): this; + once(event: "keylog", listener: (line: Buffer) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependListener(event: "secureConnect", listener: () => void): this; + prependListener(event: "session", listener: (session: Buffer) => void): this; + prependListener(event: "keylog", listener: (line: Buffer) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependOnceListener(event: "secureConnect", listener: () => void): this; + prependOnceListener(event: "session", listener: (session: Buffer) => void): this; + prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this; + } + + interface CommonConnectionOptions { + /** + * An optional TLS context object from tls.createSecureContext() + */ + secureContext?: SecureContext; + + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * @default false + */ + enableTrace?: boolean; + /** + * If true the server will request a certificate from clients that + * connect and attempt to verify that certificate. Defaults to + * false. + */ + requestCert?: boolean; + /** + * An array of strings or a Buffer naming possible ALPN protocols. + * (Protocols should be ordered by their priority.) + */ + ALPNProtocols?: string[] | Uint8Array[] | Uint8Array; + /** + * SNICallback(servername, cb) A function that will be + * called if the client supports SNI TLS extension. Two arguments + * will be passed when called: servername and cb. SNICallback should + * invoke cb(null, ctx), where ctx is a SecureContext instance. + * (tls.createSecureContext(...) can be used to get a proper + * SecureContext.) If SNICallback wasn't provided the default callback + * with high-level API will be used (see below). + */ + SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void; + /** + * If true the server will reject any connection which is not + * authorized with the list of supplied CAs. This option only has an + * effect if requestCert is true. + * @default true + */ + rejectUnauthorized?: boolean; + } + + interface TlsOptions extends SecureContextOptions, CommonConnectionOptions { + handshakeTimeout?: number; + sessionTimeout?: number; + ticketKeys?: Buffer; + } + + interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { + host?: string; + port?: number; + path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket + checkServerIdentity?: typeof checkServerIdentity; + servername?: string; // SNI TLS Extension + session?: Buffer; + minDHSize?: number; + lookup?: net.LookupFunction; + timeout?: number; + } + + class Server extends net.Server { + addContext(hostName: string, credentials: SecureContextOptions): void; + + /** + * events.EventEmitter + * 1. tlsClientError + * 2. newSession + * 3. OCSPRequest + * 4. resumeSession + * 5. secureConnection + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + addListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + addListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; + emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean; + emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean; + emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; + emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; + emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + on(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + once(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + once(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependOnceListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + } + + interface SecurePair { + encrypted: TLSSocket; + cleartext: TLSSocket; + } + + type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'; + + interface SecureContextOptions { + pfx?: string | Buffer | Array; + key?: string | Buffer | Array; + passphrase?: string; + cert?: string | Buffer | Array; + ca?: string | Buffer | Array; + ciphers?: string; + honorCipherOrder?: boolean; + ecdhCurve?: string; + clientCertEngine?: string; + crl?: string | Buffer | Array; + dhparam?: string | Buffer; + secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options + secureProtocol?: string; // SSL Method, e.g. SSLv23_method + sessionIdContext?: string; + /** + * Optionally set the maximum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. + * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using + * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to + * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. + */ + maxVersion?: SecureVersion; + /** + * Optionally set the minimum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. It is not recommended to use + * less than TLSv1.2, but it may be required for interoperability. + * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using + * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to + * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. + */ + minVersion?: SecureVersion; + } + + interface SecureContext { + context: any; + } + + /* + * Verifies the certificate `cert` is issued to host `host`. + * @host The hostname to verify the certificate against + * @cert PeerCertificate representing the peer's certificate + * + * Returns Error object, populating it with the reason, host and cert on failure. On success, returns undefined. + */ + function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined; + function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; + function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + /** + * @deprecated + */ + function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + function createSecureContext(details: SecureContextOptions): SecureContext; + function getCiphers(): string[]; + + const DEFAULT_ECDH_CURVE: string; + + const rootCertificates: ReadonlyArray; +} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts new file mode 100644 index 00000000..1f3a89c4 --- /dev/null +++ b/node_modules/@types/node/trace_events.d.ts @@ -0,0 +1,61 @@ +declare module "trace_events" { + /** + * The `Tracing` object is used to enable or disable tracing for sets of + * categories. Instances are created using the + * `trace_events.createTracing()` method. + * + * When created, the `Tracing` object is disabled. Calling the + * `tracing.enable()` method adds the categories to the set of enabled trace + * event categories. Calling `tracing.disable()` will remove the categories + * from the set of enabled trace event categories. + */ + interface Tracing { + /** + * A comma-separated list of the trace event categories covered by this + * `Tracing` object. + */ + readonly categories: string; + + /** + * Disables this `Tracing` object. + * + * Only trace event categories _not_ covered by other enabled `Tracing` + * objects and _not_ specified by the `--trace-event-categories` flag + * will be disabled. + */ + disable(): void; + + /** + * Enables this `Tracing` object for the set of categories covered by + * the `Tracing` object. + */ + enable(): void; + + /** + * `true` only if the `Tracing` object has been enabled. + */ + readonly enabled: boolean; + } + + interface CreateTracingOptions { + /** + * An array of trace category names. Values included in the array are + * coerced to a string when possible. An error will be thrown if the + * value cannot be coerced. + */ + categories: string[]; + } + + /** + * Creates and returns a Tracing object for the given set of categories. + */ + function createTracing(options: CreateTracingOptions): Tracing; + + /** + * Returns a comma-separated list of all currently-enabled trace event + * categories. The current set of enabled trace event categories is + * determined by the union of all currently-enabled `Tracing` objects and + * any categories enabled using the `--trace-event-categories` flag. + */ + function getEnabledCategories(): string | undefined; +} diff --git a/node_modules/@types/node/ts3.2/fs.d.ts b/node_modules/@types/node/ts3.2/fs.d.ts new file mode 100644 index 00000000..0a9eae07 --- /dev/null +++ b/node_modules/@types/node/ts3.2/fs.d.ts @@ -0,0 +1,33 @@ +// tslint:disable-next-line:no-bad-reference +/// + +declare module 'fs' { + interface BigIntStats extends StatsBase { + } + + class BigIntStats { + atimeNs: BigInt; + mtimeNs: BigInt; + ctimeNs: BigInt; + birthtimeNs: BigInt; + } + + interface BigIntOptions { + bigint: true; + } + + interface StatOptions { + bigint: boolean; + } + + function stat(path: PathLike, options: BigIntOptions, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void; + function stat(path: PathLike, options: StatOptions, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; + + namespace stat { + function __promisify__(path: PathLike, options: BigIntOptions): Promise; + function __promisify__(path: PathLike, options: StatOptions): Promise; + } + + function statSync(path: PathLike, options: BigIntOptions): BigIntStats; + function statSync(path: PathLike, options: StatOptions): Stats | BigIntStats; +} diff --git a/node_modules/@types/node/ts3.2/globals.d.ts b/node_modules/@types/node/ts3.2/globals.d.ts new file mode 100644 index 00000000..70892bca --- /dev/null +++ b/node_modules/@types/node/ts3.2/globals.d.ts @@ -0,0 +1,19 @@ +// tslint:disable-next-line:no-bad-reference +/// + +declare namespace NodeJS { + interface HRTime { + bigint(): bigint; + } +} + +interface Buffer extends Uint8Array { + readBigUInt64BE(offset?: number): bigint; + readBigUInt64LE(offset?: number): bigint; + readBigInt64BE(offset?: number): bigint; + readBigInt64LE(offset?: number): bigint; + writeBigInt64BE(value: bigint, offset?: number): number; + writeBigInt64LE(value: bigint, offset?: number): number; + writeBigUInt64BE(value: bigint, offset?: number): number; + writeBigUInt64LE(value: bigint, offset?: number): number; +} diff --git a/node_modules/@types/node/ts3.2/index.d.ts b/node_modules/@types/node/ts3.2/index.d.ts new file mode 100644 index 00000000..ee076935 --- /dev/null +++ b/node_modules/@types/node/ts3.2/index.d.ts @@ -0,0 +1,21 @@ +// NOTE: These definitions support NodeJS and TypeScript 3.2. + +// NOTE: TypeScript version-specific augmentations can be found in the following paths: +// - ~/base.d.ts - Shared definitions common to all TypeScript versions +// - ~/index.d.ts - Definitions specific to TypeScript 2.1 +// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 + +// Reference required types from the default lib: +/// +/// +/// +/// + +// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: +// tslint:disable-next-line:no-bad-reference +/// + +// TypeScript 3.2-specific augmentations: +/// +/// +/// diff --git a/node_modules/@types/node/ts3.2/util.d.ts b/node_modules/@types/node/ts3.2/util.d.ts new file mode 100644 index 00000000..a8b2487e --- /dev/null +++ b/node_modules/@types/node/ts3.2/util.d.ts @@ -0,0 +1,15 @@ +// tslint:disable-next-line:no-bad-reference +/// + +declare module "util" { + namespace inspect { + const custom: unique symbol; + } + namespace promisify { + const custom: unique symbol; + } + namespace types { + function isBigInt64Array(value: any): value is BigInt64Array; + function isBigUint64Array(value: any): value is BigUint64Array; + } +} diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts new file mode 100644 index 00000000..22bce21a --- /dev/null +++ b/node_modules/@types/node/tty.d.ts @@ -0,0 +1,66 @@ +declare module "tty" { + import * as net from "net"; + + function isatty(fd: number): boolean; + class ReadStream extends net.Socket { + constructor(fd: number, options?: net.SocketConstructorOpts); + isRaw: boolean; + setRawMode(mode: boolean): void; + isTTY: boolean; + } + /** + * -1 - to the left from cursor + * 0 - the entire line + * 1 - to the right from cursor + */ + type Direction = -1 | 0 | 1; + class WriteStream extends net.Socket { + constructor(fd: number); + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "resize", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "resize"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "resize", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "resize", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "resize", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "resize", listener: () => void): this; + + /** + * Clears the current line of this WriteStream in a direction identified by `dir`. + */ + clearLine(dir: Direction, callback?: () => void): boolean; + /** + * Clears this `WriteStream` from the current cursor down. + */ + clearScreenDown(callback?: () => void): boolean; + /** + * Moves this WriteStream's cursor to the specified position. + */ + cursorTo(x: number, y?: number, callback?: () => void): boolean; + cursorTo(x: number, callback: () => void): boolean; + /** + * Moves this WriteStream's cursor relative to its current position. + */ + moveCursor(dx: number, dy: number, callback?: () => void): boolean; + /** + * @default `process.env` + */ + getColorDepth(env?: {}): number; + hasColors(depth?: number): boolean; + hasColors(env?: {}): boolean; + hasColors(depth: number, env?: {}): boolean; + getWindowSize(): [number, number]; + columns: number; + rows: number; + isTTY: boolean; + } +} diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts new file mode 100644 index 00000000..e5b7e285 --- /dev/null +++ b/node_modules/@types/node/url.d.ts @@ -0,0 +1,111 @@ +declare module "url" { + import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring'; + + // Input to `url.format` + interface UrlObject { + auth?: string | null; + hash?: string | null; + host?: string | null; + hostname?: string | null; + href?: string | null; + path?: string | null; + pathname?: string | null; + protocol?: string | null; + search?: string | null; + slashes?: boolean | null; + port?: string | number | null; + query?: string | null | ParsedUrlQueryInput; + } + + // Output of `url.parse` + interface Url { + auth: string | null; + hash: string | null; + host: string | null; + hostname: string | null; + href: string; + path: string | null; + pathname: string | null; + protocol: string | null; + search: string | null; + slashes: boolean | null; + port: string | null; + query: string | null | ParsedUrlQuery; + } + + interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + + interface UrlWithStringQuery extends Url { + query: string | null; + } + + function parse(urlStr: string): UrlWithStringQuery; + function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; + function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + + function format(URL: URL, options?: URLFormatOptions): string; + function format(urlObject: UrlObject | string): string; + function resolve(from: string, to: string): string; + + function domainToASCII(domain: string): string; + function domainToUnicode(domain: string): string; + + /** + * This function ensures the correct decodings of percent-encoded characters as + * well as ensuring a cross-platform valid absolute path string. + * @param url The file URL string or URL object to convert to a path. + */ + function fileURLToPath(url: string | URL): string; + + /** + * This function ensures that path is resolved absolutely, and that the URL + * control characters are correctly encoded when converting into a File URL. + * @param url The path to convert to a File URL. + */ + function pathToFileURL(url: string): URL; + + interface URLFormatOptions { + auth?: boolean; + fragment?: boolean; + search?: boolean; + unicode?: boolean; + } + + class URL { + constructor(input: string, base?: string | URL); + hash: string; + host: string; + hostname: string; + href: string; + readonly origin: string; + password: string; + pathname: string; + port: string; + protocol: string; + search: string; + readonly searchParams: URLSearchParams; + username: string; + toString(): string; + toJSON(): string; + } + + class URLSearchParams implements Iterable<[string, string]> { + constructor(init?: URLSearchParams | string | { [key: string]: string | string[] | undefined } | Iterable<[string, string]> | Array<[string, string]>); + append(name: string, value: string): void; + delete(name: string): void; + entries(): IterableIterator<[string, string]>; + forEach(callback: (value: string, name: string, searchParams: this) => void): void; + get(name: string): string | null; + getAll(name: string): string[]; + has(name: string): boolean; + keys(): IterableIterator; + set(name: string, value: string): void; + sort(): void; + toString(): string; + values(): IterableIterator; + [Symbol.iterator](): IterableIterator<[string, string]>; + } +} diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts new file mode 100644 index 00000000..e0b6c895 --- /dev/null +++ b/node_modules/@types/node/util.d.ts @@ -0,0 +1,180 @@ +declare module "util" { + interface InspectOptions extends NodeJS.InspectOptions { } + function format(format: any, ...param: any[]): string; + function formatWithOptions(inspectOptions: InspectOptions, format: string, ...param: any[]): string; + /** @deprecated since v0.11.3 - use a third party module instead. */ + function log(string: string): void; + function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + function inspect(object: any, options: InspectOptions): string; + namespace inspect { + let colors: { + [color: string]: [number, number] | undefined + }; + let styles: { + [style: string]: string | undefined + }; + let defaultOptions: InspectOptions; + /** + * Allows changing inspect settings from the repl. + */ + let replDefaults: InspectOptions; + } + /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */ + function isArray(object: any): object is any[]; + /** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */ + function isRegExp(object: any): object is RegExp; + /** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */ + function isDate(object: any): object is Date; + /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */ + function isError(object: any): object is Error; + function inherits(constructor: any, superConstructor: any): void; + function debuglog(key: string): (msg: string, ...param: any[]) => void; + /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */ + function isBoolean(object: any): object is boolean; + /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */ + function isBuffer(object: any): object is Buffer; + /** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */ + function isFunction(object: any): boolean; + /** @deprecated since v4.0.0 - use `value === null` instead. */ + function isNull(object: any): object is null; + /** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */ + function isNullOrUndefined(object: any): object is null | undefined; + /** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */ + function isNumber(object: any): object is number; + /** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */ + function isObject(object: any): boolean; + /** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */ + function isPrimitive(object: any): boolean; + /** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */ + function isString(object: any): object is string; + /** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */ + function isSymbol(object: any): object is symbol; + /** @deprecated since v4.0.0 - use `value === undefined` instead. */ + function isUndefined(object: any): object is undefined; + function deprecate(fn: T, message: string, code?: string): T; + function isDeepStrictEqual(val1: any, val2: any): boolean; + + interface CustomPromisify extends Function { + __promisify__: TCustom; + } + + function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + + function promisify(fn: CustomPromisify): TCustom; + function promisify(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise; + function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; + function promisify(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise; + function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void): + (arg1: T1, arg2: T2, arg3: T3) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void): + (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + function promisify(fn: Function): Function; + + namespace types { + function isAnyArrayBuffer(object: any): boolean; + function isArgumentsObject(object: any): object is IArguments; + function isArrayBuffer(object: any): object is ArrayBuffer; + function isAsyncFunction(object: any): boolean; + function isBooleanObject(object: any): object is Boolean; + function isBoxedPrimitive(object: any): object is (Number | Boolean | String | Symbol /* | Object(BigInt) | Object(Symbol) */); + function isDataView(object: any): object is DataView; + function isDate(object: any): object is Date; + function isExternal(object: any): boolean; + function isFloat32Array(object: any): object is Float32Array; + function isFloat64Array(object: any): object is Float64Array; + function isGeneratorFunction(object: any): boolean; + function isGeneratorObject(object: any): boolean; + function isInt8Array(object: any): object is Int8Array; + function isInt16Array(object: any): object is Int16Array; + function isInt32Array(object: any): object is Int32Array; + function isMap(object: any): boolean; + function isMapIterator(object: any): boolean; + function isModuleNamespaceObject(value: any): boolean; + function isNativeError(object: any): object is Error; + function isNumberObject(object: any): object is Number; + function isPromise(object: any): boolean; + function isProxy(object: any): boolean; + function isRegExp(object: any): object is RegExp; + function isSet(object: any): boolean; + function isSetIterator(object: any): boolean; + function isSharedArrayBuffer(object: any): boolean; + function isStringObject(object: any): boolean; + function isSymbolObject(object: any): boolean; + function isTypedArray(object: any): object is NodeJS.TypedArray; + function isUint8Array(object: any): object is Uint8Array; + function isUint8ClampedArray(object: any): object is Uint8ClampedArray; + function isUint16Array(object: any): object is Uint16Array; + function isUint32Array(object: any): object is Uint32Array; + function isWeakMap(object: any): boolean; + function isWeakSet(object: any): boolean; + function isWebAssemblyCompiledModule(object: any): boolean; + } + + class TextDecoder { + readonly encoding: string; + readonly fatal: boolean; + readonly ignoreBOM: boolean; + constructor( + encoding?: string, + options?: { fatal?: boolean; ignoreBOM?: boolean } + ); + decode( + input?: NodeJS.ArrayBufferView | ArrayBuffer | null, + options?: { stream?: boolean } + ): string; + } + + interface EncodeIntoResult { + /** + * The read Unicode code units of input. + */ + + read: number; + /** + * The written UTF-8 bytes of output. + */ + written: number; + } + + class TextEncoder { + readonly encoding: string; + encode(input?: string): Uint8Array; + encodeInto(input: string, output: Uint8Array): EncodeIntoResult; + } +} diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts new file mode 100644 index 00000000..2e2706e2 --- /dev/null +++ b/node_modules/@types/node/v8.d.ts @@ -0,0 +1,197 @@ +declare module "v8" { + import { Readable } from "stream"; + + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + + // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ + type DoesZapCodeSpaceFlag = 0 | 1; + + interface HeapInfo { + total_heap_size: number; + total_heap_size_executable: number; + total_physical_size: number; + total_available_size: number; + used_heap_size: number; + heap_size_limit: number; + malloced_memory: number; + peak_malloced_memory: number; + does_zap_garbage: DoesZapCodeSpaceFlag; + number_of_native_contexts: number; + number_of_detached_contexts: number; + } + + interface HeapCodeStatistics { + code_and_metadata_size: number; + bytecode_and_metadata_size: number; + external_script_source_size: number; + } + + /** + * Returns an integer representing a "version tag" derived from the V8 version, command line flags and detected CPU features. + * This is useful for determining whether a vm.Script cachedData buffer is compatible with this instance of V8. + */ + function cachedDataVersionTag(): number; + + function getHeapStatistics(): HeapInfo; + function getHeapSpaceStatistics(): HeapSpaceInfo[]; + function setFlagsFromString(flags: string): void; + /** + * Generates a snapshot of the current V8 heap and returns a Readable + * Stream that may be used to read the JSON serialized representation. + * This conversation was marked as resolved by joyeecheung + * This JSON stream format is intended to be used with tools such as + * Chrome DevTools. The JSON schema is undocumented and specific to the + * V8 engine, and may change from one version of V8 to the next. + */ + function getHeapSnapshot(): Readable; + + /** + * + * @param fileName The file path where the V8 heap snapshot is to be + * saved. If not specified, a file name with the pattern + * `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be + * generated, where `{pid}` will be the PID of the Node.js process, + * `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from + * the main Node.js thread or the id of a worker thread. + */ + function writeHeapSnapshot(fileName?: string): string; + + function getHeapCodeStatistics(): HeapCodeStatistics; + + /** + * @experimental + */ + class Serializer { + /** + * Writes out a header, which includes the serialization format version. + */ + writeHeader(): void; + + /** + * Serializes a JavaScript value and adds the serialized representation to the internal buffer. + * This throws an error if value cannot be serialized. + */ + writeValue(val: any): boolean; + + /** + * Returns the stored internal buffer. + * This serializer should not be used once the buffer is released. + * Calling this method results in undefined behavior if a previous write has failed. + */ + releaseBuffer(): Buffer; + + /** + * Marks an ArrayBuffer as having its contents transferred out of band.\ + * Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer(). + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + + /** + * Write a raw 32-bit unsigned integer. + */ + writeUint32(value: number): void; + + /** + * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. + */ + writeUint64(hi: number, lo: number): void; + + /** + * Write a JS number value. + */ + writeDouble(value: number): void; + + /** + * Write raw bytes into the serializer’s internal buffer. + * The deserializer will require a way to compute the length of the buffer. + */ + writeRawBytes(buffer: NodeJS.TypedArray): void; + } + + /** + * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects, + * and only stores the part of their underlying `ArrayBuffers` that they are referring to. + * @experimental + */ + class DefaultSerializer extends Serializer { + } + + /** + * @experimental + */ + class Deserializer { + constructor(data: NodeJS.TypedArray); + /** + * Reads and validates a header (including the format version). + * May, for example, reject an invalid or unsupported wire format. + * In that case, an Error is thrown. + */ + readHeader(): boolean; + + /** + * Deserializes a JavaScript value from the buffer and returns it. + */ + readValue(): any; + + /** + * Marks an ArrayBuffer as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the serializing context to serializer.transferArrayBuffer() + * (or return the id from serializer._getSharedArrayBufferId() in the case of SharedArrayBuffers). + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + + /** + * Reads the underlying wire format version. + * Likely mostly to be useful to legacy code reading old wire format versions. + * May not be called before .readHeader(). + */ + getWireFormatVersion(): number; + + /** + * Read a raw 32-bit unsigned integer and return it. + */ + readUint32(): number; + + /** + * Read a raw 64-bit unsigned integer and return it as an array [hi, lo] with two 32-bit unsigned integer entries. + */ + readUint64(): [number, number]; + + /** + * Read a JS number value. + */ + readDouble(): number; + + /** + * Read raw bytes from the deserializer’s internal buffer. + * The length parameter must correspond to the length of the buffer that was passed to serializer.writeRawBytes(). + */ + readRawBytes(length: number): Buffer; + } + + /** + * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects, + * and only stores the part of their underlying `ArrayBuffers` that they are referring to. + * @experimental + */ + class DefaultDeserializer extends Deserializer { + } + + /** + * Uses a `DefaultSerializer` to serialize value into a buffer. + * @experimental + */ + function serialize(value: any): Buffer; + + /** + * Uses a `DefaultDeserializer` with default options to read a JS value from a buffer. + * @experimental + */ + function deserialize(data: NodeJS.TypedArray): any; +} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts new file mode 100644 index 00000000..208498c1 --- /dev/null +++ b/node_modules/@types/node/vm.d.ts @@ -0,0 +1,110 @@ +declare module "vm" { + interface Context { + [key: string]: any; + } + interface BaseOptions { + /** + * Specifies the filename used in stack traces produced by this script. + * Default: `''`. + */ + filename?: string; + /** + * Specifies the line number offset that is displayed in stack traces produced by this script. + * Default: `0`. + */ + lineOffset?: number; + /** + * Specifies the column number offset that is displayed in stack traces produced by this script. + * Default: `0` + */ + columnOffset?: number; + } + interface ScriptOptions extends BaseOptions { + displayErrors?: boolean; + timeout?: number; + cachedData?: Buffer; + produceCachedData?: boolean; + } + interface RunningScriptOptions extends BaseOptions { + /** + * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace. + * Default: `true`. + */ + displayErrors?: boolean; + /** + * Specifies the number of milliseconds to execute code before terminating execution. + * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer. + */ + timeout?: number; + /** + * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received. + * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that. + * If execution is terminated, an `Error` will be thrown. + * Default: `false`. + */ + breakOnSigint?: boolean; + } + interface CompileFunctionOptions extends BaseOptions { + /** + * Provides an optional data with V8's code cache data for the supplied source. + */ + cachedData?: Buffer; + /** + * Specifies whether to produce new cache data. + * Default: `false`, + */ + produceCachedData?: boolean; + /** + * The sandbox/context in which the said function should be compiled in. + */ + parsingContext?: Context; + + /** + * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling + */ + contextExtensions?: Object[]; + } + + interface CreateContextOptions { + /** + * Human-readable name of the newly created context. + * @default 'VM Context i' Where i is an ascending numerical index of the created context. + */ + name?: string; + /** + * Corresponds to the newly created context for display purposes. + * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary), + * like the value of the `url.origin` property of a URL object. + * Most notably, this string should omit the trailing slash, as that denotes a path. + * @default '' + */ + origin?: string; + codeGeneration?: { + /** + * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc) + * will throw an EvalError. + * @default true + */ + strings?: boolean; + /** + * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError. + * @default true + */ + wasm?: boolean; + }; + } + + class Script { + constructor(code: string, options?: ScriptOptions); + runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; + runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; + runInThisContext(options?: RunningScriptOptions): any; + createCachedData(): Buffer; + } + function createContext(sandbox?: Context, options?: CreateContextOptions): Context; + function isContext(sandbox: Context): boolean; + function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any; + function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any; + function runInThisContext(code: string, options?: RunningScriptOptions | string): any; + function compileFunction(code: string, params: string[], options: CompileFunctionOptions): Function; +} diff --git a/node_modules/@types/node/worker_threads.d.ts b/node_modules/@types/node/worker_threads.d.ts new file mode 100644 index 00000000..45ea85e0 --- /dev/null +++ b/node_modules/@types/node/worker_threads.d.ts @@ -0,0 +1,153 @@ +declare module "worker_threads" { + import { Context } from "vm"; + import { EventEmitter } from "events"; + import { Readable, Writable } from "stream"; + + const isMainThread: boolean; + const parentPort: null | MessagePort; + const threadId: number; + const workerData: any; + + class MessageChannel { + readonly port1: MessagePort; + readonly port2: MessagePort; + } + + class MessagePort extends EventEmitter { + close(): void; + postMessage(value: any, transferList?: Array): void; + ref(): void; + unref(): void; + start(): void; + + addListener(event: "close", listener: () => void): this; + addListener(event: "message", listener: (value: any) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "message", value: any): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "message", listener: (value: any) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "message", listener: (value: any) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "message", listener: (value: any) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "message", listener: (value: any) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "close", listener: () => void): this; + removeListener(event: "message", listener: (value: any) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: "close", listener: () => void): this; + off(event: "message", listener: (value: any) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + } + + interface WorkerOptions { + eval?: boolean; + workerData?: any; + stdin?: boolean; + stdout?: boolean; + stderr?: boolean; + execArgv?: string[]; + } + + class Worker extends EventEmitter { + readonly stdin: Writable | null; + readonly stdout: Readable; + readonly stderr: Readable; + readonly threadId: number; + + constructor(filename: string, options?: WorkerOptions); + + postMessage(value: any, transferList?: Array): void; + ref(): void; + unref(): void; + /** + * Stop all JavaScript execution in the worker thread as soon as possible. + * Returns a Promise for the exit code that is fulfilled when the `exit` event is emitted. + */ + terminate(): Promise; + /** + * Transfer a `MessagePort` to a different `vm` Context. The original `port` + * object will be rendered unusable, and the returned `MessagePort` instance will + * take its place. + * + * The returned `MessagePort` will be an object in the target context, and will + * inherit from its global `Object` class. Objects passed to the + * `port.onmessage()` listener will also be created in the target context + * and inherit from its global `Object` class. + * + * However, the created `MessagePort` will no longer inherit from + * `EventEmitter`, and only `port.onmessage()` can be used to receive + * events using it. + */ + moveMessagePortToContext(port: MessagePort, context: Context): MessagePort; + + /** + * Receive a single message from a given `MessagePort`. If no message is available, + * `undefined` is returned, otherwise an object with a single `message` property + * that contains the message payload, corresponding to the oldest message in the + * `MessagePort`’s queue. + */ + receiveMessageOnPort(port: MessagePort): {} | undefined; + + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "exit", listener: (exitCode: number) => void): this; + addListener(event: "message", listener: (value: any) => void): this; + addListener(event: "online", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "error", err: Error): boolean; + emit(event: "exit", exitCode: number): boolean; + emit(event: "message", value: any): boolean; + emit(event: "online"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "error", listener: (err: Error) => void): this; + on(event: "exit", listener: (exitCode: number) => void): this; + on(event: "message", listener: (value: any) => void): this; + on(event: "online", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "error", listener: (err: Error) => void): this; + once(event: "exit", listener: (exitCode: number) => void): this; + once(event: "message", listener: (value: any) => void): this; + once(event: "online", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "exit", listener: (exitCode: number) => void): this; + prependListener(event: "message", listener: (value: any) => void): this; + prependListener(event: "online", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "exit", listener: (exitCode: number) => void): this; + prependOnceListener(event: "message", listener: (value: any) => void): this; + prependOnceListener(event: "online", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "exit", listener: (exitCode: number) => void): this; + removeListener(event: "message", listener: (value: any) => void): this; + removeListener(event: "online", listener: () => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: "error", listener: (err: Error) => void): this; + off(event: "exit", listener: (exitCode: number) => void): this; + off(event: "message", listener: (value: any) => void): this; + off(event: "online", listener: () => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + } +} diff --git a/node_modules/@types/node/zlib.d.ts b/node_modules/@types/node/zlib.d.ts new file mode 100644 index 00000000..a03e900c --- /dev/null +++ b/node_modules/@types/node/zlib.d.ts @@ -0,0 +1,352 @@ +declare module "zlib" { + import * as stream from "stream"; + + interface ZlibOptions { + /** + * @default constants.Z_NO_FLUSH + */ + flush?: number; + /** + * @default constants.Z_FINISH + */ + finishFlush?: number; + /** + * @default 16*1024 + */ + chunkSize?: number; + windowBits?: number; + level?: number; // compression only + memLevel?: number; // compression only + strategy?: number; // compression only + dictionary?: NodeJS.ArrayBufferView | ArrayBuffer; // deflate/inflate only, empty dictionary by default + } + + interface BrotliOptions { + /** + * @default constants.BROTLI_OPERATION_PROCESS + */ + flush?: number; + /** + * @default constants.BROTLI_OPERATION_FINISH + */ + finishFlush?: number; + /** + * @default 16*1024 + */ + chunkSize?: number; + params?: { + /** + * Each key is a `constants.BROTLI_*` constant. + */ + [key: number]: boolean | number; + }; + } + + interface Zlib { + /** @deprecated Use bytesWritten instead. */ + readonly bytesRead: number; + readonly bytesWritten: number; + shell?: boolean | string; + close(callback?: () => void): void; + flush(kind?: number | (() => void), callback?: () => void): void; + } + + interface ZlibParams { + params(level: number, strategy: number, callback: () => void): void; + } + + interface ZlibReset { + reset(): void; + } + + interface BrotliCompress extends stream.Transform, Zlib { } + interface BrotliDecompress extends stream.Transform, Zlib { } + interface Gzip extends stream.Transform, Zlib { } + interface Gunzip extends stream.Transform, Zlib { } + interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { } + interface Inflate extends stream.Transform, Zlib, ZlibReset { } + interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { } + interface InflateRaw extends stream.Transform, Zlib, ZlibReset { } + interface Unzip extends stream.Transform, Zlib { } + + function createBrotliCompress(options?: BrotliOptions): BrotliCompress; + function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress; + function createGzip(options?: ZlibOptions): Gzip; + function createGunzip(options?: ZlibOptions): Gunzip; + function createDeflate(options?: ZlibOptions): Deflate; + function createInflate(options?: ZlibOptions): Inflate; + function createDeflateRaw(options?: ZlibOptions): DeflateRaw; + function createInflateRaw(options?: ZlibOptions): InflateRaw; + function createUnzip(options?: ZlibOptions): Unzip; + + type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView; + + type CompressCallback = (error: Error | null, result: Buffer) => void; + + function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void; + function brotliCompress(buf: InputType, callback: CompressCallback): void; + function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer; + function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void; + function brotliDecompress(buf: InputType, callback: CompressCallback): void; + function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer; + function deflate(buf: InputType, callback: CompressCallback): void; + function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function deflateSync(buf: InputType, options?: ZlibOptions): Buffer; + function deflateRaw(buf: InputType, callback: CompressCallback): void; + function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; + function gzip(buf: InputType, callback: CompressCallback): void; + function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function gzipSync(buf: InputType, options?: ZlibOptions): Buffer; + function gunzip(buf: InputType, callback: CompressCallback): void; + function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer; + function inflate(buf: InputType, callback: CompressCallback): void; + function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function inflateSync(buf: InputType, options?: ZlibOptions): Buffer; + function inflateRaw(buf: InputType, callback: CompressCallback): void; + function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; + function unzip(buf: InputType, callback: CompressCallback): void; + function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function unzipSync(buf: InputType, options?: ZlibOptions): Buffer; + + namespace constants { + const BROTLI_DECODE: number; + const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number; + const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number; + const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number; + const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number; + const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number; + const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number; + const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number; + const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number; + const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number; + const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number; + const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number; + const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number; + const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number; + const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number; + const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number; + const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number; + const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number; + const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number; + const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number; + const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number; + const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number; + const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number; + const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number; + const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number; + const BROTLI_DECODER_ERROR_UNREACHABLE: number; + const BROTLI_DECODER_NEEDS_MORE_INPUT: number; + const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number; + const BROTLI_DECODER_NO_ERROR: number; + const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number; + const BROTLI_DECODER_PARAM_LARGE_WINDOW: number; + const BROTLI_DECODER_RESULT_ERROR: number; + const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number; + const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number; + const BROTLI_DECODER_RESULT_SUCCESS: number; + const BROTLI_DECODER_SUCCESS: number; + + const BROTLI_DEFAULT_MODE: number; + const BROTLI_DEFAULT_QUALITY: number; + const BROTLI_DEFAULT_WINDOW: number; + const BROTLI_ENCODE: number; + const BROTLI_LARGE_MAX_WINDOW_BITS: number; + const BROTLI_MAX_INPUT_BLOCK_BITS: number; + const BROTLI_MAX_QUALITY: number; + const BROTLI_MAX_WINDOW_BITS: number; + const BROTLI_MIN_INPUT_BLOCK_BITS: number; + const BROTLI_MIN_QUALITY: number; + const BROTLI_MIN_WINDOW_BITS: number; + + const BROTLI_MODE_FONT: number; + const BROTLI_MODE_GENERIC: number; + const BROTLI_MODE_TEXT: number; + + const BROTLI_OPERATION_EMIT_METADATA: number; + const BROTLI_OPERATION_FINISH: number; + const BROTLI_OPERATION_FLUSH: number; + const BROTLI_OPERATION_PROCESS: number; + + const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number; + const BROTLI_PARAM_LARGE_WINDOW: number; + const BROTLI_PARAM_LGBLOCK: number; + const BROTLI_PARAM_LGWIN: number; + const BROTLI_PARAM_MODE: number; + const BROTLI_PARAM_NDIRECT: number; + const BROTLI_PARAM_NPOSTFIX: number; + const BROTLI_PARAM_QUALITY: number; + const BROTLI_PARAM_SIZE_HINT: number; + + const DEFLATE: number; + const DEFLATERAW: number; + const GUNZIP: number; + const GZIP: number; + const INFLATE: number; + const INFLATERAW: number; + const UNZIP: number; + + const Z_BEST_COMPRESSION: number; + const Z_BEST_SPEED: number; + const Z_BLOCK: number; + const Z_BUF_ERROR: number; + const Z_DATA_ERROR: number; + + const Z_DEFAULT_CHUNK: number; + const Z_DEFAULT_COMPRESSION: number; + const Z_DEFAULT_LEVEL: number; + const Z_DEFAULT_MEMLEVEL: number; + const Z_DEFAULT_STRATEGY: number; + const Z_DEFAULT_WINDOWBITS: number; + + const Z_ERRNO: number; + const Z_FILTERED: number; + const Z_FINISH: number; + const Z_FIXED: number; + const Z_FULL_FLUSH: number; + const Z_HUFFMAN_ONLY: number; + const Z_MAX_CHUNK: number; + const Z_MAX_LEVEL: number; + const Z_MAX_MEMLEVEL: number; + const Z_MAX_WINDOWBITS: number; + const Z_MEM_ERROR: number; + const Z_MIN_CHUNK: number; + const Z_MIN_LEVEL: number; + const Z_MIN_MEMLEVEL: number; + const Z_MIN_WINDOWBITS: number; + const Z_NEED_DICT: number; + const Z_NO_COMPRESSION: number; + const Z_NO_FLUSH: number; + const Z_OK: number; + const Z_PARTIAL_FLUSH: number; + const Z_RLE: number; + const Z_STREAM_END: number; + const Z_STREAM_ERROR: number; + const Z_SYNC_FLUSH: number; + const Z_VERSION_ERROR: number; + const ZLIB_VERNUM: number; + } + + /** + * @deprecated + */ + const Z_NO_FLUSH: number; + /** + * @deprecated + */ + const Z_PARTIAL_FLUSH: number; + /** + * @deprecated + */ + const Z_SYNC_FLUSH: number; + /** + * @deprecated + */ + const Z_FULL_FLUSH: number; + /** + * @deprecated + */ + const Z_FINISH: number; + /** + * @deprecated + */ + const Z_BLOCK: number; + /** + * @deprecated + */ + const Z_TREES: number; + /** + * @deprecated + */ + const Z_OK: number; + /** + * @deprecated + */ + const Z_STREAM_END: number; + /** + * @deprecated + */ + const Z_NEED_DICT: number; + /** + * @deprecated + */ + const Z_ERRNO: number; + /** + * @deprecated + */ + const Z_STREAM_ERROR: number; + /** + * @deprecated + */ + const Z_DATA_ERROR: number; + /** + * @deprecated + */ + const Z_MEM_ERROR: number; + /** + * @deprecated + */ + const Z_BUF_ERROR: number; + /** + * @deprecated + */ + const Z_VERSION_ERROR: number; + /** + * @deprecated + */ + const Z_NO_COMPRESSION: number; + /** + * @deprecated + */ + const Z_BEST_SPEED: number; + /** + * @deprecated + */ + const Z_BEST_COMPRESSION: number; + /** + * @deprecated + */ + const Z_DEFAULT_COMPRESSION: number; + /** + * @deprecated + */ + const Z_FILTERED: number; + /** + * @deprecated + */ + const Z_HUFFMAN_ONLY: number; + /** + * @deprecated + */ + const Z_RLE: number; + /** + * @deprecated + */ + const Z_FIXED: number; + /** + * @deprecated + */ + const Z_DEFAULT_STRATEGY: number; + /** + * @deprecated + */ + const Z_BINARY: number; + /** + * @deprecated + */ + const Z_TEXT: number; + /** + * @deprecated + */ + const Z_ASCII: number; + /** + * @deprecated + */ + const Z_UNKNOWN: number; + /** + * @deprecated + */ + const Z_DEFLATED: number; +} diff --git a/node_modules/atob-lite/LICENSE.md b/node_modules/atob-lite/LICENSE.md new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/node_modules/atob-lite/LICENSE.md @@ -0,0 +1,18 @@ +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. diff --git a/node_modules/atob-lite/README.md b/node_modules/atob-lite/README.md new file mode 100644 index 00000000..99ea05d5 --- /dev/null +++ b/node_modules/atob-lite/README.md @@ -0,0 +1,37 @@ +# atob-lite +![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat) +![](http://img.shields.io/npm/v/atob-lite.svg?style=flat) +![](http://img.shields.io/npm/dm/atob-lite.svg?style=flat) +![](http://img.shields.io/npm/l/atob-lite.svg?style=flat) + +Smallest/simplest possible means of using atob with both Node and browserify. + +In the browser, decoding base64 strings is done using: + +``` javascript +var decoded = atob(encoded) +``` + +However in Node, it's done like so: + +``` javascript +var decoded = new Buffer(encoded, 'base64').toString('utf8') +``` + +You can easily check if `Buffer` exists and switch between the approaches +accordingly, but using `Buffer` anywhere in your browser source will pull +in browserify's `Buffer` shim which is pretty hefty. This package uses +the `main` and `browser` fields in its `package.json` to perform this +check at build time and avoid pulling `Buffer` in unnecessarily. + +## Usage + +[![NPM](https://nodei.co/npm/atob-lite.png)](https://nodei.co/npm/atob-lite/) + +### `decoded = atob(encoded)` + +Returns the decoded value of a base64-encoded string. + +## License + +MIT. See [LICENSE.md](http://github.com/hughsk/atob-lite/blob/master/LICENSE.md) for details. diff --git a/node_modules/atob-lite/atob-browser.js b/node_modules/atob-lite/atob-browser.js new file mode 100644 index 00000000..cee1a38c --- /dev/null +++ b/node_modules/atob-lite/atob-browser.js @@ -0,0 +1,3 @@ +module.exports = function _atob(str) { + return atob(str) +} diff --git a/node_modules/atob-lite/atob-node.js b/node_modules/atob-lite/atob-node.js new file mode 100644 index 00000000..70720756 --- /dev/null +++ b/node_modules/atob-lite/atob-node.js @@ -0,0 +1,3 @@ +module.exports = function atob(str) { + return Buffer.from(str, 'base64').toString('binary') +} diff --git a/node_modules/atob-lite/package.json b/node_modules/atob-lite/package.json new file mode 100644 index 00000000..1434d3c8 --- /dev/null +++ b/node_modules/atob-lite/package.json @@ -0,0 +1,70 @@ +{ + "_args": [ + [ + "atob-lite@2.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "atob-lite@2.0.0", + "_id": "atob-lite@2.0.0", + "_inBundle": false, + "_integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=", + "_location": "/atob-lite", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "atob-lite@2.0.0", + "name": "atob-lite", + "escapedName": "atob-lite", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "browser": "atob-browser.js", + "bugs": { + "url": "https://github.com/hughsk/atob-lite/issues" + }, + "dependencies": {}, + "description": "Smallest/simplest possible means of using atob with both Node and browserify", + "devDependencies": { + "browserify": "^10.2.4", + "smokestack": "^3.3.0", + "tap-closer": "^1.0.0", + "tap-spec": "^4.0.0", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/hughsk/atob-lite", + "keywords": [ + "atob", + "base64", + "isomorphic", + "browser", + "node", + "shared" + ], + "license": "MIT", + "main": "atob-node.js", + "name": "atob-lite", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/atob-lite.git" + }, + "scripts": { + "test": "npm run test-node && npm run test-browser", + "test-browser": "browserify test | smokestack | tap-spec", + "test-node": "node test | tap-spec" + }, + "version": "2.0.0" +} diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md new file mode 100644 index 00000000..2cdc8e41 --- /dev/null +++ b/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(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. diff --git a/node_modules/balanced-match/README.md b/node_modules/balanced-match/README.md new file mode 100644 index 00000000..08e918c0 --- /dev/null +++ b/node_modules/balanced-match/README.md @@ -0,0 +1,91 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! + +[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) +[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) + +[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) + +## Example + +Get the first matching pair of braces: + +```js +var balanced = require('balanced-match'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +``` + +The matches are: + +```bash +$ node example.js +{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } +{ start: 3, + end: 9, + pre: 'pre', + body: 'first', + post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } +``` + +## API + +### var m = balanced(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +object with those keys: + +* **start** the index of the first match of `a` +* **end** the index of the matching `b` +* **pre** the preamble, `a` and `b` not included +* **body** the match, `a` and `b` not included +* **post** the postscript, `a` and `b` not included + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. + +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install balanced-match +``` + +## License + +(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. diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js new file mode 100644 index 00000000..1685a762 --- /dev/null +++ b/node_modules/balanced-match/index.js @@ -0,0 +1,59 @@ +'use strict'; +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json new file mode 100644 index 00000000..afe06348 --- /dev/null +++ b/node_modules/balanced-match/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + "balanced-match@1.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "balanced-match@1.0.0", + "_id": "balanced-match@1.0.0", + "_inBundle": false, + "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "_location": "/balanced-match", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "balanced-match@1.0.0", + "name": "balanced-match", + "escapedName": "balanced-match", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/balanced-match/issues" + }, + "dependencies": {}, + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "homepage": "https://github.com/juliangruber/balanced-match", + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "license": "MIT", + "main": "index.js", + "name": "balanced-match", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "scripts": { + "bench": "make bench", + "test": "make test" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..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" + ] + }, + "version": "1.0.0" +} diff --git a/node_modules/before-after-hook/LICENSE b/node_modules/before-after-hook/LICENSE new file mode 100644 index 00000000..225063c3 --- /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 00000000..68c927d9 --- /dev/null +++ b/node_modules/before-after-hook/README.md @@ -0,0 +1,574 @@ +# 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 + +Recommended for [TypeScript](#typescript) + +```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. `getData` + +`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 `getData`. + +If `errorHook` throws an error then `handleGetError` is called next, otherwise +`afterHook` and `getData`. + +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) +- [collection.api](#collectionapi) +- [collection()](#collection) +- [collection.before()](#collectionbefore) +- [collection.error()](#collectionerror) +- [collection.after()](#collectionafter) +- [collection.wrap()](#collectionwrap) +- [collection.remove()](#collectionremove) + +### 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. When you use TypeScript we highly recommend using the `Hook.Singular` constructor for your hooks as this allows you to pass along type information for the options object. For example: + +```ts + +import {Hook} from 'before-after-hook' + +interface Foo { + bar: string + num: number; +} + +const hook = new Hook.Singular(); + +hook.before(function (foo) { + + // typescript will complain about the following mutation attempts + foo.hello = 'world' + foo.bar = 123 + + // yet this is valid + foo.bar = 'other-string' + foo.num = 123 +}) + +const foo = hook(function(foo) { + // handle `foo` + foo.bar = 'another-string' +}, {bar: 'random-string'}) + +// foo outputs +{ + bar: 'another-string', + num: 123 +} +``` + +An alternative import: + +```ts +import {Singular, Collection} from 'before-after-hook' + +const hook = new Singular<{foo: string}>(); +const hookCollection = 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 00000000..3c19a5c9 --- /dev/null +++ b/node_modules/before-after-hook/index.d.ts @@ -0,0 +1,96 @@ +type HookMethod = (options: O) => R | Promise + +type BeforeHook = (options: O) => void +type ErrorHook = (error: E, options: O) => void +type AfterHook = (result: R, options: O) => void +type WrapHook = ( + hookMethod: HookMethod, + options: O +) => R | Promise + +type AnyHook = + | BeforeHook + | ErrorHook + | AfterHook + | WrapHook + +export interface HookCollection { + /** + * Invoke before and after hooks + */ + ( + name: string | string[], + hookMethod: HookMethod, + options?: any + ): Promise + /** + * Add `before` hook for given `name` + */ + before(name: string, beforeHook: BeforeHook): void + /** + * Add `error` hook for given `name` + */ + error(name: string, errorHook: ErrorHook): void + /** + * Add `after` hook for given `name` + */ + after(name: string, afterHook: AfterHook): void + /** + * Add `wrap` hook for given `name` + */ + wrap(name: string, wrapHook: WrapHook): void + /** + * Remove added hook for given `name` + */ + remove(name: string, hook: AnyHook): void +} + +export interface HookSingular { + /** + * Invoke before and after hooks + */ + (hookMethod: HookMethod, options?: O): 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 +} + +type Collection = new () => HookCollection +type Singular = new () => HookSingular + +interface Hook { + new (): 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 00000000..a97d89b7 --- /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 00000000..a34e3f46 --- /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 00000000..b3d01fdc --- /dev/null +++ b/node_modules/before-after-hook/lib/register.js @@ -0,0 +1,28 @@ +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 00000000..e357c514 --- /dev/null +++ b/node_modules/before-after-hook/lib/remove.js @@ -0,0 +1,17 @@ +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 00000000..d76f8fc2 --- /dev/null +++ b/node_modules/before-after-hook/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "before-after-hook@2.1.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "before-after-hook@2.1.0", + "_id": "before-after-hook@2.1.0", + "_inBundle": false, + "_integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", + "_location": "/before-after-hook", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "before-after-hook@2.1.0", + "name": "before-after-hook", + "escapedName": "before-after-hook", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Gregor Martynus" + }, + "bugs": { + "url": "https://github.com/gr2m/before-after-hook/issues" + }, + "dependencies": {}, + "description": "asynchronous before/error/after hooks for internal functionality", + "devDependencies": { + "browserify": "^16.0.0", + "gaze-cli": "^0.2.0", + "istanbul": "^0.4.0", + "istanbul-coveralls": "^1.0.3", + "mkdirp": "^0.5.1", + "rimraf": "^2.4.4", + "semantic-release": "^15.0.0", + "simple-mock": "^0.8.0", + "standard": "^13.0.1", + "tap-min": "^2.0.0", + "tap-spec": "^5.0.0", + "tape": "^4.2.2", + "typescript": "^3.5.3", + "uglify-js": "^3.0.0" + }, + "files": [ + "index.js", + "index.d.ts", + "lib" + ], + "homepage": "https://github.com/gr2m/before-after-hook#readme", + "keywords": [ + "hook", + "hooks", + "api" + ], + "license": "Apache-2.0", + "name": "before-after-hook", + "release": { + "publish": [ + "@semantic-release/npm", + { + "path": "@semantic-release/github", + "assets": [ + "dist/*.js" + ] + } + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/before-after-hook.git" + }, + "scripts": { + "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", + "posttest": "npm run validate:ts", + "postvalidate:ts": "tsc --noEmit --strict --target es6 test/typescript-validate.ts", + "prebuild": "rimraf dist && mkdirp dist", + "presemantic-release": "npm run build", + "pretest": "standard", + "semantic-release": "semantic-release", + "test": "npm run -s test:node | tap-spec", + "test:coverage": "istanbul cover test", + "test:coverage:upload": "istanbul-coveralls", + "test:node": "node test", + "test:watch": "gaze 'clear && node test | tap-min' 'test/**/*.js' 'index.js' 'lib/**/*.js'", + "validate:ts": "tsc --strict --target es6 index.d.ts" + }, + "types": "./index.d.ts", + "version": "2.1.0" +} diff --git a/node_modules/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE new file mode 100644 index 00000000..de322667 --- /dev/null +++ b/node_modules/brace-expansion/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md new file mode 100644 index 00000000..6b4e0e16 --- /dev/null +++ b/node_modules/brace-expansion/README.md @@ -0,0 +1,129 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! + +## License + +(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. diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js new file mode 100644 index 00000000..0478be81 --- /dev/null +++ b/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json new file mode 100644 index 00000000..f93d6bd3 --- /dev/null +++ b/node_modules/brace-expansion/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "brace-expansion@1.1.11", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "brace-expansion@1.1.11", + "_id": "brace-expansion@1.1.11", + "_inBundle": false, + "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "_location": "/brace-expansion", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "brace-expansion@1.1.11", + "name": "brace-expansion", + "escapedName": "brace-expansion", + "rawSpec": "1.1.11", + "saveSpec": null, + "fetchSpec": "1.1.11" + }, + "_requiredBy": [ + "/minimatch" + ], + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "_spec": "1.1.11", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "description": "Brace expansion as known from sh/bash", + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "keywords": [], + "license": "MIT", + "main": "index.js", + "name": "brace-expansion", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "scripts": { + "bench": "matcha test/perf/bench.js", + "gentest": "bash test/generate.sh", + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..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" + ] + }, + "version": "1.1.11" +} diff --git a/node_modules/btoa-lite/LICENSE.md b/node_modules/btoa-lite/LICENSE.md new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/node_modules/btoa-lite/LICENSE.md @@ -0,0 +1,18 @@ +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. diff --git a/node_modules/btoa-lite/README.md b/node_modules/btoa-lite/README.md new file mode 100644 index 00000000..e36492e9 --- /dev/null +++ b/node_modules/btoa-lite/README.md @@ -0,0 +1,37 @@ +# btoa-lite +![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat) +![](http://img.shields.io/npm/v/btoa-lite.svg?style=flat) +![](http://img.shields.io/npm/dm/btoa-lite.svg?style=flat) +![](http://img.shields.io/npm/l/btoa-lite.svg?style=flat) + +Smallest/simplest possible means of using btoa with both Node and browserify. + +In the browser, encoding base64 strings is done using: + +``` javascript +var encoded = btoa(decoded) +``` + +However in Node, it's done like so: + +``` javascript +var encoded = new Buffer(decoded).toString('base64') +``` + +You can easily check if `Buffer` exists and switch between the approaches +accordingly, but using `Buffer` anywhere in your browser source will pull +in browserify's `Buffer` shim which is pretty hefty. This package uses +the `main` and `browser` fields in its `package.json` to perform this +check at build time and avoid pulling `Buffer` in unnecessarily. + +## Usage + +[![NPM](https://nodei.co/npm/btoa-lite.png)](https://nodei.co/npm/btoa-lite/) + +### `encoded = btoa(decoded)` + +Returns the base64-encoded value of a string. + +## License + +MIT. See [LICENSE.md](http://github.com/hughsk/btoa-lite/blob/master/LICENSE.md) for details. diff --git a/node_modules/btoa-lite/btoa-browser.js b/node_modules/btoa-lite/btoa-browser.js new file mode 100644 index 00000000..1b3acdbe --- /dev/null +++ b/node_modules/btoa-lite/btoa-browser.js @@ -0,0 +1,3 @@ +module.exports = function _btoa(str) { + return btoa(str) +} diff --git a/node_modules/btoa-lite/btoa-node.js b/node_modules/btoa-lite/btoa-node.js new file mode 100644 index 00000000..0278470b --- /dev/null +++ b/node_modules/btoa-lite/btoa-node.js @@ -0,0 +1,3 @@ +module.exports = function btoa(str) { + return new Buffer(str).toString('base64') +} diff --git a/node_modules/btoa-lite/package.json b/node_modules/btoa-lite/package.json new file mode 100644 index 00000000..8ddeda57 --- /dev/null +++ b/node_modules/btoa-lite/package.json @@ -0,0 +1,69 @@ +{ + "_args": [ + [ + "btoa-lite@1.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "btoa-lite@1.0.0", + "_id": "btoa-lite@1.0.0", + "_inBundle": false, + "_integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", + "_location": "/btoa-lite", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "btoa-lite@1.0.0", + "name": "btoa-lite", + "escapedName": "btoa-lite", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "browser": "btoa-browser.js", + "bugs": { + "url": "https://github.com/hughsk/btoa-lite/issues" + }, + "dependencies": {}, + "description": "Smallest/simplest possible means of using btoa with both Node and browserify", + "devDependencies": { + "browserify": "^10.2.4", + "smokestack": "^3.3.0", + "tap-spec": "^4.0.0", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/hughsk/btoa-lite", + "keywords": [ + "btoa", + "base64", + "isomorphic", + "browser", + "node", + "shared" + ], + "license": "MIT", + "main": "btoa-node.js", + "name": "btoa-lite", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/btoa-lite.git" + }, + "scripts": { + "test": "npm run test-node && npm run test-browser", + "test-browser": "browserify test | smokestack | tap-spec", + "test-node": "node test | tap-spec" + }, + "version": "1.0.0" +} diff --git a/node_modules/concat-map/LICENSE b/node_modules/concat-map/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/node_modules/concat-map/LICENSE @@ -0,0 +1,18 @@ +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. diff --git a/node_modules/concat-map/README.markdown b/node_modules/concat-map/README.markdown new file mode 100644 index 00000000..408f70a1 --- /dev/null +++ b/node_modules/concat-map/README.markdown @@ -0,0 +1,62 @@ +concat-map +========== + +Concatenative mapdashery. + +[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) + +[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) + +example +======= + +``` js +var concatMap = require('concat-map'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); +``` + +*** + +``` +[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] +``` + +methods +======= + +``` js +var concatMap = require('concat-map') +``` + +concatMap(xs, fn) +----------------- + +Return an array of concatenated elements by calling `fn(x, i)` for each element +`x` and each index `i` in the array `xs`. + +When `fn(x, i)` returns an array, its result will be concatenated with the +result array. If `fn(x, i)` returns anything else, that value will be pushed +onto the end of the result array. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install concat-map +``` + +license +======= + +MIT + +notes +===== + +This module was written while sitting high above the ground in a tree. diff --git a/node_modules/concat-map/example/map.js b/node_modules/concat-map/example/map.js new file mode 100644 index 00000000..33656217 --- /dev/null +++ b/node_modules/concat-map/example/map.js @@ -0,0 +1,6 @@ +var concatMap = require('../'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); diff --git a/node_modules/concat-map/index.js b/node_modules/concat-map/index.js new file mode 100644 index 00000000..b29a7812 --- /dev/null +++ b/node_modules/concat-map/index.js @@ -0,0 +1,13 @@ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json new file mode 100644 index 00000000..88c90833 --- /dev/null +++ b/node_modules/concat-map/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + "concat-map@0.0.1", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "concat-map@0.0.1", + "_id": "concat-map@0.0.1", + "_inBundle": false, + "_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "_location": "/concat-map", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "concat-map@0.0.1", + "name": "concat-map", + "escapedName": "concat-map", + "rawSpec": "0.0.1", + "saveSpec": null, + "fetchSpec": "0.0.1" + }, + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "_spec": "0.0.1", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-concat-map/issues" + }, + "description": "concatenative mapdashery", + "devDependencies": { + "tape": "~2.4.0" + }, + "directories": { + "example": "example", + "test": "test" + }, + "homepage": "https://github.com/substack/node-concat-map#readme", + "keywords": [ + "concat", + "concatMap", + "map", + "functional", + "higher-order" + ], + "license": "MIT", + "main": "index.js", + "name": "concat-map", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-concat-map.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "version": "0.0.1" +} diff --git a/node_modules/concat-map/test/map.js b/node_modules/concat-map/test/map.js new file mode 100644 index 00000000..fdbd7022 --- /dev/null +++ b/node_modules/concat-map/test/map.js @@ -0,0 +1,39 @@ +var concatMap = require('../'); +var test = require('tape'); + +test('empty or not', function (t) { + var xs = [ 1, 2, 3, 4, 5, 6 ]; + var ixes = []; + var ys = concatMap(xs, function (x, ix) { + ixes.push(ix); + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; + }); + t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); + t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); + t.end(); +}); + +test('always something', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('scalars', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : x; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('undefs', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function () {}); + t.same(ys, [ undefined, undefined, undefined, undefined ]); + t.end(); +}); diff --git a/node_modules/cross-spawn/CHANGELOG.md b/node_modules/cross-spawn/CHANGELOG.md new file mode 100644 index 00000000..ded9620b --- /dev/null +++ b/node_modules/cross-spawn/CHANGELOG.md @@ -0,0 +1,100 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +
+## [6.0.5](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.4...v6.0.5) (2018-03-02) + + +### Bug Fixes + +* avoid using deprecated Buffer constructor ([#94](https://github.com/moxystudio/node-cross-spawn/issues/94)) ([d5770df](https://github.com/moxystudio/node-cross-spawn/commit/d5770df)), closes [/nodejs.org/api/deprecations.html#deprecations_dep0005](https://github.com//nodejs.org/api/deprecations.html/issues/deprecations_dep0005) + + + + +## [6.0.4](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.3...v6.0.4) (2018-01-31) + + +### Bug Fixes + +* fix paths being incorrectly normalized on unix ([06ee3c6](https://github.com/moxystudio/node-cross-spawn/commit/06ee3c6)), closes [#90](https://github.com/moxystudio/node-cross-spawn/issues/90) + + + + +## [6.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.2...v6.0.3) (2018-01-23) + + + + +## [6.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.1...v6.0.2) (2018-01-23) + + + + +## [6.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.0...v6.0.1) (2018-01-23) + + + + +# [6.0.0](https://github.com/moxystudio/node-cross-spawn/compare/5.1.0...6.0.0) (2018-01-23) + + +### Bug Fixes + +* fix certain arguments not being correctly escaped or causing batch syntax error ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)), closes [#82](https://github.com/moxystudio/node-cross-spawn/issues/82) [#51](https://github.com/moxystudio/node-cross-spawn/issues/51) +* fix commands as posix relatixe paths not working correctly, e.g.: `./my-command` ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* fix `options` argument being mutated ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* fix commands resolution when PATH was actually Path ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) + + +### Features + +* improve compliance with node's ENOENT errors ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* improve detection of node's shell option support ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) + + +### Chores + +* upgrade tooling +* upgrate project to es6 (node v4) + + +### BREAKING CHANGES + +* remove support for older nodejs versions, only `node >= 4` is supported + + + +## [5.1.0](https://github.com/moxystudio/node-cross-spawn/compare/5.0.1...5.1.0) (2017-02-26) + + +### Bug Fixes + +* fix `options.shell` support for NodeJS [v4.8](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V4.md#4.8.0) + + + +## [5.0.1](https://github.com/moxystudio/node-cross-spawn/compare/5.0.0...5.0.1) (2016-11-04) + + +### Bug Fixes + +* fix `options.shell` support for NodeJS v7 + + + +# [5.0.0](https://github.com/moxystudio/node-cross-spawn/compare/4.0.2...5.0.0) (2016-10-30) + + +## Features + +* add support for `options.shell` +* improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module + + +## Chores + +* refactor some code to make it more clear +* update README caveats diff --git a/node_modules/cross-spawn/LICENSE b/node_modules/cross-spawn/LICENSE new file mode 100644 index 00000000..8407b9a3 --- /dev/null +++ b/node_modules/cross-spawn/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +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/cross-spawn/README.md b/node_modules/cross-spawn/README.md new file mode 100644 index 00000000..e895cd7a --- /dev/null +++ b/node_modules/cross-spawn/README.md @@ -0,0 +1,94 @@ +# cross-spawn + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] + +[npm-url]:https://npmjs.org/package/cross-spawn +[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg +[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg +[travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn +[travis-image]:http://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg +[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn +[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg +[codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn +[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg +[david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn +[david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg +[david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev +[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg +[greenkeeper-image]:https://badges.greenkeeper.io/moxystudio/node-cross-spawn.svg +[greenkeeper-url]:https://greenkeeper.io/ + +A cross platform solution to node's spawn and spawnSync. + + +## Installation + +`$ npm install cross-spawn` + + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix)) +- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367) +- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`) +- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149) +- No `options.shell` support on node `` where `` must not contain any arguments. +If you would like to have the shebang support improved, feel free to contribute via a pull-request. + +Remember to always test your code on Windows! + + +## Tests + +`$ npm test` +`$ npm test -- --watch` during development + +## License + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/node_modules/cross-spawn/index.js b/node_modules/cross-spawn/index.js new file mode 100644 index 00000000..5509742c --- /dev/null +++ b/node_modules/cross-spawn/index.js @@ -0,0 +1,39 @@ +'use strict'; + +const cp = require('child_process'); +const parse = require('./lib/parse'); +const enoent = require('./lib/enoent'); + +function spawn(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + + // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + + return result; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/node_modules/cross-spawn/lib/enoent.js b/node_modules/cross-spawn/lib/enoent.js new file mode 100644 index 00000000..14df9b62 --- /dev/null +++ b/node_modules/cross-spawn/lib/enoent.js @@ -0,0 +1,59 @@ +'use strict'; + +const isWin = process.platform === 'win32'; + +function notFoundError(original, syscall) { + return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { + code: 'ENOENT', + errno: 'ENOENT', + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args, + }); +} + +function hookChildProcess(cp, parsed) { + if (!isWin) { + return; + } + + const originalEmit = cp.emit; + + cp.emit = function (name, arg1) { + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + const err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params + }; +} + +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } + + return null; +} + +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + + return null; +} + +module.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError, +}; diff --git a/node_modules/cross-spawn/lib/parse.js b/node_modules/cross-spawn/lib/parse.js new file mode 100644 index 00000000..962827a9 --- /dev/null +++ b/node_modules/cross-spawn/lib/parse.js @@ -0,0 +1,125 @@ +'use strict'; + +const path = require('path'); +const niceTry = require('nice-try'); +const resolveCommand = require('./util/resolveCommand'); +const escape = require('./util/escape'); +const readShebang = require('./util/readShebang'); +const semver = require('semver'); + +const isWin = process.platform === 'win32'; +const isExecutableRegExp = /\.(?:com|exe)$/i; +const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + +// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0 +const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false; + +function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + + const shebang = parsed.file && readShebang(parsed.file); + + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + + return resolveCommand(parsed); + } + + return parsed.file; +} + +function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } + + // Detect & add support for shebangs + const commandFile = detectShebang(parsed); + + // We don't need a shell if the command filename is an executable + const needsShell = !isExecutableRegExp.test(commandFile); + + // If a shell is required, use cmd.exe and take care of escaping everything correctly + // Note that `forceShell` is an hidden option used only in tests + if (parsed.options.forceShell || needsShell) { + // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` + // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument + // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, + // we need to double escape them + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); + + // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) + // This is necessary otherwise it will always fail with ENOENT in those cases + parsed.command = path.normalize(parsed.command); + + // Escape command & arguments + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); + + const shellCommand = [parsed.command].concat(parsed.args).join(' '); + + parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; + parsed.command = process.env.comspec || 'cmd.exe'; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } + + return parsed; +} + +function parseShell(parsed) { + // If node supports the shell option, there's no need to mimic its behavior + if (supportsShellOption) { + return parsed; + } + + // Mimic node shell option + // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 + const shellCommand = [parsed.command].concat(parsed.args).join(' '); + + if (isWin) { + parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; + parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } else { + if (typeof parsed.options.shell === 'string') { + parsed.command = parsed.options.shell; + } else if (process.platform === 'android') { + parsed.command = '/system/bin/sh'; + } else { + parsed.command = '/bin/sh'; + } + + parsed.args = ['-c', shellCommand]; + } + + return parsed; +} + +function parse(command, args, options) { + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = Object.assign({}, options); // Clone object to avoid changing the original + + // Build our parsed object + const parsed = { + command, + args, + options, + file: undefined, + original: { + command, + args, + }, + }; + + // Delegate further parsing to shell or non-shell + return options.shell ? parseShell(parsed) : parseNonShell(parsed); +} + +module.exports = parse; diff --git a/node_modules/cross-spawn/lib/util/escape.js b/node_modules/cross-spawn/lib/util/escape.js new file mode 100644 index 00000000..b0bb84c3 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/escape.js @@ -0,0 +1,45 @@ +'use strict'; + +// See http://www.robvanderwoude.com/escapechars.php +const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + +function escapeCommand(arg) { + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); + + return arg; +} + +function escapeArgument(arg, doubleEscapeMetaChars) { + // Convert to string + arg = `${arg}`; + + // Algorithm below is based on https://qntm.org/cmd + + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + + // Sequence of backslashes followed by the end of the string + // (which will become a double quote later): + // double up all the backslashes + arg = arg.replace(/(\\*)$/, '$1$1'); + + // All other backslashes occur literally + + // Quote the whole thing: + arg = `"${arg}"`; + + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); + + // Double escape meta chars if necessary + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, '^$1'); + } + + return arg; +} + +module.exports.command = escapeCommand; +module.exports.argument = escapeArgument; diff --git a/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/cross-spawn/lib/util/readShebang.js new file mode 100644 index 00000000..bd4f1280 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/readShebang.js @@ -0,0 +1,32 @@ +'use strict'; + +const fs = require('fs'); +const shebangCommand = require('shebang-command'); + +function readShebang(command) { + // Read the first 150 bytes from the file + const size = 150; + let buffer; + + if (Buffer.alloc) { + // Node.js v4.5+ / v5.10+ + buffer = Buffer.alloc(size); + } else { + // Old Node.js API + buffer = new Buffer(size); + buffer.fill(0); // zero-fill + } + + let fd; + + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, size, 0); + fs.closeSync(fd); + } catch (e) { /* Empty */ } + + // Attempt to extract shebang (null is returned if not a shebang) + return shebangCommand(buffer.toString()); +} + +module.exports = readShebang; diff --git a/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/cross-spawn/lib/util/resolveCommand.js new file mode 100644 index 00000000..2fd5ad27 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/resolveCommand.js @@ -0,0 +1,47 @@ +'use strict'; + +const path = require('path'); +const which = require('which'); +const pathKey = require('path-key')(); + +function resolveCommandAttempt(parsed, withoutPathExt) { + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + + // If a custom `cwd` was specified, we need to change the process cwd + // because `which` will do stat calls but does not support a custom cwd + if (hasCustomCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + /* Empty */ + } + } + + let resolved; + + try { + resolved = which.sync(parsed.command, { + path: (parsed.options.env || process.env)[pathKey], + pathExt: withoutPathExt ? path.delimiter : undefined, + }); + } catch (e) { + /* Empty */ + } finally { + process.chdir(cwd); + } + + // If we successfully resolved, ensure that an absolute path is returned + // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it + if (resolved) { + resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); + } + + return resolved; +} + +function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); +} + +module.exports = resolveCommand; diff --git a/node_modules/cross-spawn/node_modules/semver/CHANGELOG.md b/node_modules/cross-spawn/node_modules/semver/CHANGELOG.md new file mode 100644 index 00000000..66304fdd --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/CHANGELOG.md @@ -0,0 +1,39 @@ +# changes log + +## 5.7 + +* Add `minVersion` method + +## 5.6 + +* Move boolean `loose` param to an options object, with + backwards-compatibility protection. +* Add ability to opt out of special prerelease version handling with + the `includePrerelease` option flag. + +## 5.5 + +* Add version coercion capabilities + +## 5.4 + +* Add intersection checking + +## 5.3 + +* Add `minSatisfying` method + +## 5.2 + +* Add `prerelease(v)` that returns prerelease components + +## 5.1 + +* Add Backus-Naur for ranges +* Remove excessively cute inspection methods + +## 5.0 + +* Remove AMD/Browserified build artifacts +* Fix ltr and gtr when using the `*` range +* Fix for range `*` with a prerelease identifier diff --git a/node_modules/cross-spawn/node_modules/semver/LICENSE b/node_modules/cross-spawn/node_modules/semver/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/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/cross-spawn/node_modules/semver/README.md b/node_modules/cross-spawn/node_modules/semver/README.md new file mode 100644 index 00000000..f8dfa5a0 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/README.md @@ -0,0 +1,412 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install --save semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/cross-spawn/node_modules/semver/bin/semver b/node_modules/cross-spawn/node_modules/semver/bin/semver new file mode 100755 index 00000000..801e77f1 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/bin/semver @@ -0,0 +1,160 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/node_modules/cross-spawn/node_modules/semver/package.json b/node_modules/cross-spawn/node_modules/semver/package.json new file mode 100644 index 00000000..d01790fa --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/package.json @@ -0,0 +1,63 @@ +{ + "_args": [ + [ + "semver@5.7.1", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "semver@5.7.1", + "_id": "semver@5.7.1", + "_inBundle": false, + "_integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "_location": "/cross-spawn/semver", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "semver@5.7.1", + "name": "semver", + "escapedName": "semver", + "rawSpec": "5.7.1", + "saveSpec": null, + "fetchSpec": "5.7.1" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "_spec": "5.7.1", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bin": { + "semver": "bin/semver" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "description": "The semantic version parser used by npm.", + "devDependencies": { + "tap": "^13.0.0-rc.18" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" + }, + "tap": { + "check-coverage": true + }, + "version": "5.7.1" +} diff --git a/node_modules/cross-spawn/node_modules/semver/range.bnf b/node_modules/cross-spawn/node_modules/semver/range.bnf new file mode 100644 index 00000000..d4c6ae0d --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/cross-spawn/node_modules/semver/semver.js b/node_modules/cross-spawn/node_modules/semver/semver.js new file mode 100644 index 00000000..d315d5d6 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/semver.js @@ -0,0 +1,1483 @@ +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var R = 0 + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' + +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' + +src[FULL] = '^' + FULLPLAIN + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' + +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' + +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++ +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' + +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' + +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[LOOSE] : re[FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY) { + return true + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + }) + }) +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[TILDELOOSE] : re[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[CARETLOOSE] : re[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], '') +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(re[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} diff --git a/node_modules/cross-spawn/package.json b/node_modules/cross-spawn/package.json new file mode 100644 index 00000000..99862322 --- /dev/null +++ b/node_modules/cross-spawn/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + "cross-spawn@6.0.5", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "cross-spawn@6.0.5", + "_id": "cross-spawn@6.0.5", + "_inBundle": false, + "_integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "_location": "/cross-spawn", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cross-spawn@6.0.5", + "name": "cross-spawn", + "escapedName": "cross-spawn", + "rawSpec": "6.0.5", + "saveSpec": null, + "fetchSpec": "6.0.5" + }, + "_requiredBy": [ + "/eslint", + "/execa" + ], + "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "_spec": "6.0.5", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "André Cruz", + "email": "andre@moxy.studio" + }, + "bugs": { + "url": "https://github.com/moxystudio/node-cross-spawn/issues" + }, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "description": "Cross platform child_process#spawn and child_process#spawnSync", + "devDependencies": { + "@commitlint/cli": "^6.0.0", + "@commitlint/config-conventional": "^6.0.2", + "babel-core": "^6.26.0", + "babel-jest": "^22.1.0", + "babel-preset-moxy": "^2.2.1", + "eslint": "^4.3.0", + "eslint-config-moxy": "^5.0.0", + "husky": "^0.14.3", + "jest": "^22.0.0", + "lint-staged": "^7.0.0", + "mkdirp": "^0.5.1", + "regenerator-runtime": "^0.11.1", + "rimraf": "^2.6.2", + "standard-version": "^4.2.0" + }, + "engines": { + "node": ">=4.8" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/moxystudio/node-cross-spawn", + "keywords": [ + "spawn", + "spawnSync", + "windows", + "cross-platform", + "path-ext", + "shebang", + "cmd", + "execute" + ], + "license": "MIT", + "lint-staged": { + "*.js": [ + "eslint --fix", + "git add" + ] + }, + "main": "index.js", + "name": "cross-spawn", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/moxystudio/node-cross-spawn.git" + }, + "scripts": { + "commitmsg": "commitlint -e $GIT_PARAMS", + "lint": "eslint .", + "precommit": "lint-staged", + "prerelease": "npm t && npm run lint", + "release": "standard-version", + "test": "jest --env node --coverage" + }, + "standard-version": { + "scripts": { + "posttag": "git push --follow-tags origin master && npm publish" + } + }, + "version": "6.0.5" +} diff --git a/node_modules/deprecation/LICENSE b/node_modules/deprecation/LICENSE new file mode 100644 index 00000000..1683b583 --- /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 00000000..648809d5 --- /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 00000000..9da17757 --- /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 00000000..7950fdc0 --- /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 00000000..e3ae7ad4 --- /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 00000000..c6bbda75 --- /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 00000000..7ac37b9e --- /dev/null +++ b/node_modules/deprecation/package.json @@ -0,0 +1,68 @@ +{ + "_args": [ + [ + "deprecation@2.3.1", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "deprecation@2.3.1", + "_id": "deprecation@2.3.1", + "_inBundle": false, + "_integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "_location": "/deprecation", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "deprecation@2.3.1", + "name": "deprecation", + "escapedName": "deprecation", + "rawSpec": "2.3.1", + "saveSpec": null, + "fetchSpec": "2.3.1" + }, + "_requiredBy": [ + "/@octokit/request", + "/@octokit/request-error", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "_spec": "2.3.1", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/gr2m/deprecation/issues" + }, + "dependencies": {}, + "description": "Log a deprecation message with stack", + "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" + }, + "esnext": "dist-src/index.js", + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/gr2m/deprecation#readme", + "keywords": [ + "deprecate", + "deprecated", + "deprecation" + ], + "license": "ISC", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "deprecation", + "pika": true, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/deprecation.git" + }, + "sideEffects": false, + "types": "dist-types/index.d.ts", + "version": "2.3.1" +} diff --git a/node_modules/end-of-stream/LICENSE b/node_modules/end-of-stream/LICENSE new file mode 100644 index 00000000..757562ec --- /dev/null +++ b/node_modules/end-of-stream/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +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/end-of-stream/README.md b/node_modules/end-of-stream/README.md new file mode 100644 index 00000000..857b14bd --- /dev/null +++ b/node_modules/end-of-stream/README.md @@ -0,0 +1,54 @@ +# end-of-stream + +A node module that calls a callback when a readable/writable/duplex stream has completed or failed. + + npm install end-of-stream + +[![Build status](https://travis-ci.org/mafintosh/end-of-stream.svg?branch=master)](https://travis-ci.org/mafintosh/end-of-stream) + +## Usage + +Simply pass a stream and a callback to the `eos`. +Both legacy streams, streams2 and stream3 are supported. + +``` js +var eos = require('end-of-stream'); + +eos(readableStream, function(err) { + // this will be set to the stream instance + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended', this === readableStream); +}); + +eos(writableStream, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has finished', this === writableStream); +}); + +eos(duplexStream, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended and finished', this === duplexStream); +}); + +eos(duplexStream, {readable:false}, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has finished but might still be readable'); +}); + +eos(duplexStream, {writable:false}, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended but might still be writable'); +}); + +eos(readableStream, {error:false}, function(err) { + // do not treat emit('error', err) as a end-of-stream +}); +``` + +## License + +MIT + +## Related + +`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/end-of-stream/index.js b/node_modules/end-of-stream/index.js new file mode 100644 index 00000000..c77f0d5d --- /dev/null +++ b/node_modules/end-of-stream/index.js @@ -0,0 +1,94 @@ +var once = require('once'); + +var noop = function() {}; + +var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +}; + +var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 +}; + +var eos = function(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + + callback = once(callback || noop); + + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || (opts.readable !== false && stream.readable); + var writable = opts.writable || (opts.writable !== false && stream.writable); + var cancelled = false; + + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; + + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; + + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; + + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); + }; + + var onerror = function(err) { + callback.call(stream, err); + }; + + var onclose = function() { + process.nextTick(onclosenexttick); + }; + + var onclosenexttick = function() { + if (cancelled) return; + if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); + if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); + }; + + var onrequest = function() { + stream.req.on('finish', onfinish); + }; + + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest(); + else stream.on('request', onrequest); + } else if (writable && !ws) { // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + + if (isChildProcess(stream)) stream.on('exit', onexit); + + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + + return function() { + cancelled = true; + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('exit', onexit); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +}; + +module.exports = eos; diff --git a/node_modules/end-of-stream/package.json b/node_modules/end-of-stream/package.json new file mode 100644 index 00000000..3c5266b5 --- /dev/null +++ b/node_modules/end-of-stream/package.json @@ -0,0 +1,68 @@ +{ + "_args": [ + [ + "end-of-stream@1.4.4", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "end-of-stream@1.4.4", + "_id": "end-of-stream@1.4.4", + "_inBundle": false, + "_integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "_location": "/end-of-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "end-of-stream@1.4.4", + "name": "end-of-stream", + "escapedName": "end-of-stream", + "rawSpec": "1.4.4", + "saveSpec": null, + "fetchSpec": "1.4.4" + }, + "_requiredBy": [ + "/pump" + ], + "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "_spec": "1.4.4", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Mathias Buus", + "email": "mathiasbuus@gmail.com" + }, + "bugs": { + "url": "https://github.com/mafintosh/end-of-stream/issues" + }, + "dependencies": { + "once": "^1.4.0" + }, + "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", + "devDependencies": { + "tape": "^4.11.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/mafintosh/end-of-stream", + "keywords": [ + "stream", + "streams", + "callback", + "finish", + "close", + "end", + "wait" + ], + "license": "MIT", + "main": "index.js", + "name": "end-of-stream", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/end-of-stream.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.4.4" +} diff --git a/node_modules/execa/index.js b/node_modules/execa/index.js new file mode 100644 index 00000000..aad9ac88 --- /dev/null +++ b/node_modules/execa/index.js @@ -0,0 +1,361 @@ +'use strict'; +const path = require('path'); +const childProcess = require('child_process'); +const crossSpawn = require('cross-spawn'); +const stripEof = require('strip-eof'); +const npmRunPath = require('npm-run-path'); +const isStream = require('is-stream'); +const _getStream = require('get-stream'); +const pFinally = require('p-finally'); +const onExit = require('signal-exit'); +const errname = require('./lib/errname'); +const stdio = require('./lib/stdio'); + +const TEN_MEGABYTES = 1000 * 1000 * 10; + +function handleArgs(cmd, args, opts) { + let parsed; + + opts = Object.assign({ + extendEnv: true, + env: {} + }, opts); + + if (opts.extendEnv) { + opts.env = Object.assign({}, process.env, opts.env); + } + + if (opts.__winShell === true) { + delete opts.__winShell; + parsed = { + command: cmd, + args, + options: opts, + file: cmd, + original: { + cmd, + args + } + }; + } else { + parsed = crossSpawn._parse(cmd, args, opts); + } + + opts = Object.assign({ + maxBuffer: TEN_MEGABYTES, + buffer: true, + stripEof: true, + preferLocal: true, + localDir: parsed.options.cwd || process.cwd(), + encoding: 'utf8', + reject: true, + cleanup: true + }, parsed.options); + + opts.stdio = stdio(opts); + + if (opts.preferLocal) { + opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); + } + + if (opts.detached) { + // #115 + opts.cleanup = false; + } + + if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { + // #116 + parsed.args.unshift('/q'); + } + + return { + cmd: parsed.command, + args: parsed.args, + opts, + parsed + }; +} + +function handleInput(spawned, input) { + if (input === null || input === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +} + +function handleOutput(opts, val) { + if (val && opts.stripEof) { + val = stripEof(val); + } + + return val; +} + +function handleShell(fn, cmd, opts) { + let file = '/bin/sh'; + let args = ['-c', cmd]; + + opts = Object.assign({}, opts); + + if (process.platform === 'win32') { + opts.__winShell = true; + file = process.env.comspec || 'cmd.exe'; + args = ['/s', '/c', `"${cmd}"`]; + opts.windowsVerbatimArguments = true; + } + + if (opts.shell) { + file = opts.shell; + delete opts.shell; + } + + return fn(file, args, opts); +} + +function getStream(process, stream, {encoding, buffer, maxBuffer}) { + if (!process[stream]) { + return null; + } + + let ret; + + if (!buffer) { + // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10 + ret = new Promise((resolve, reject) => { + process[stream] + .once('end', resolve) + .once('error', reject); + }); + } else if (encoding) { + ret = _getStream(process[stream], { + encoding, + maxBuffer + }); + } else { + ret = _getStream.buffer(process[stream], {maxBuffer}); + } + + return ret.catch(err => { + err.stream = stream; + err.message = `${stream} ${err.message}`; + throw err; + }); +} + +function makeError(result, options) { + const {stdout, stderr} = result; + + let err = result.error; + const {code, signal} = result; + + const {parsed, joinedCmd} = options; + const timedOut = options.timedOut || false; + + if (!err) { + let output = ''; + + if (Array.isArray(parsed.opts.stdio)) { + if (parsed.opts.stdio[2] !== 'inherit') { + output += output.length > 0 ? stderr : `\n${stderr}`; + } + + if (parsed.opts.stdio[1] !== 'inherit') { + output += `\n${stdout}`; + } + } else if (parsed.opts.stdio !== 'inherit') { + output = `\n${stderr}${stdout}`; + } + + err = new Error(`Command failed: ${joinedCmd}${output}`); + err.code = code < 0 ? errname(code) : code; + } + + err.stdout = stdout; + err.stderr = stderr; + err.failed = true; + err.signal = signal || null; + err.cmd = joinedCmd; + err.timedOut = timedOut; + + return err; +} + +function joinCmd(cmd, args) { + let joinedCmd = cmd; + + if (Array.isArray(args) && args.length > 0) { + joinedCmd += ' ' + args.join(' '); + } + + return joinedCmd; +} + +module.exports = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const {encoding, buffer, maxBuffer} = parsed.opts; + const joinedCmd = joinCmd(cmd, args); + + let spawned; + try { + spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); + } catch (err) { + return Promise.reject(err); + } + + let removeExitHandler; + if (parsed.opts.cleanup) { + removeExitHandler = onExit(() => { + spawned.kill(); + }); + } + + let timeoutId = null; + let timedOut = false; + + const cleanup = () => { + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = null; + } + + if (removeExitHandler) { + removeExitHandler(); + } + }; + + if (parsed.opts.timeout > 0) { + timeoutId = setTimeout(() => { + timeoutId = null; + timedOut = true; + spawned.kill(parsed.opts.killSignal); + }, parsed.opts.timeout); + } + + const processDone = new Promise(resolve => { + spawned.on('exit', (code, signal) => { + cleanup(); + resolve({code, signal}); + }); + + spawned.on('error', err => { + cleanup(); + resolve({error: err}); + }); + + if (spawned.stdin) { + spawned.stdin.on('error', err => { + cleanup(); + resolve({error: err}); + }); + } + }); + + function destroy() { + if (spawned.stdout) { + spawned.stdout.destroy(); + } + + if (spawned.stderr) { + spawned.stderr.destroy(); + } + } + + const handlePromise = () => pFinally(Promise.all([ + processDone, + getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}), + getStream(spawned, 'stderr', {encoding, buffer, maxBuffer}) + ]).then(arr => { + const result = arr[0]; + result.stdout = arr[1]; + result.stderr = arr[2]; + + if (result.error || result.code !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed, + timedOut + }); + + // TODO: missing some timeout logic for killed + // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 + // err.killed = spawned.killed || killed; + err.killed = err.killed || spawned.killed; + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + killed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; + }), destroy); + + crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); + + handleInput(spawned, parsed.opts.input); + + spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); + spawned.catch = onrejected => handlePromise().catch(onrejected); + + return spawned; +}; + +// TODO: set `stderr: 'ignore'` when that option is implemented +module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout); + +// TODO: set `stdout: 'ignore'` when that option is implemented +module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr); + +module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); + +module.exports.sync = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const joinedCmd = joinCmd(cmd, args); + + if (isStream(parsed.opts.input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } + + const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); + result.code = result.status; + + if (result.error || result.status !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed + }); + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; +}; + +module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); diff --git a/node_modules/execa/lib/errname.js b/node_modules/execa/lib/errname.js new file mode 100644 index 00000000..e367837b --- /dev/null +++ b/node_modules/execa/lib/errname.js @@ -0,0 +1,39 @@ +'use strict'; +// Older verions of Node.js might not have `util.getSystemErrorName()`. +// In that case, fall back to a deprecated internal. +const util = require('util'); + +let uv; + +if (typeof util.getSystemErrorName === 'function') { + module.exports = util.getSystemErrorName; +} else { + try { + uv = process.binding('uv'); + + if (typeof uv.errname !== 'function') { + throw new TypeError('uv.errname is not a function'); + } + } catch (err) { + console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); + uv = null; + } + + module.exports = code => errname(uv, code); +} + +// Used for testing the fallback behavior +module.exports.__test__ = errname; + +function errname(uv, code) { + if (uv) { + return uv.errname(code); + } + + if (!(code < 0)) { + throw new Error('err >= 0'); + } + + return `Unknown system error ${code}`; +} + diff --git a/node_modules/execa/lib/stdio.js b/node_modules/execa/lib/stdio.js new file mode 100644 index 00000000..a82d4683 --- /dev/null +++ b/node_modules/execa/lib/stdio.js @@ -0,0 +1,41 @@ +'use strict'; +const alias = ['stdin', 'stdout', 'stderr']; + +const hasAlias = opts => alias.some(x => Boolean(opts[x])); + +module.exports = opts => { + if (!opts) { + return null; + } + + if (opts.stdio && hasAlias(opts)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); + } + + if (typeof opts.stdio === 'string') { + return opts.stdio; + } + + const stdio = opts.stdio || []; + + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + + const result = []; + const len = Math.max(stdio.length, alias.length); + + for (let i = 0; i < len; i++) { + let value = null; + + if (stdio[i] !== undefined) { + value = stdio[i]; + } else if (opts[alias[i]] !== undefined) { + value = opts[alias[i]]; + } + + result[i] = value; + } + + return result; +}; diff --git a/node_modules/execa/license b/node_modules/execa/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/execa/license @@ -0,0 +1,9 @@ +MIT License + +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. diff --git a/node_modules/execa/package.json b/node_modules/execa/package.json new file mode 100644 index 00000000..dcba3bfe --- /dev/null +++ b/node_modules/execa/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + "execa@1.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "execa@1.0.0", + "_id": "execa@1.0.0", + "_inBundle": false, + "_integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "_location": "/execa", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "execa@1.0.0", + "name": "execa", + "escapedName": "execa", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/jest-changed-files", + "/sane", + "/windows-release" + ], + "_resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/execa/issues" + }, + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "description": "A better `child_process`", + "devDependencies": { + "ava": "*", + "cat-names": "^1.0.2", + "coveralls": "^3.0.1", + "delay": "^3.0.0", + "is-running": "^2.0.0", + "nyc": "^13.0.1", + "tempfile": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/sindresorhus/execa#readme", + "keywords": [ + "exec", + "child", + "process", + "execute", + "fork", + "execfile", + "spawn", + "file", + "shell", + "bin", + "binary", + "binaries", + "npm", + "path", + "local" + ], + "license": "MIT", + "name": "execa", + "nyc": { + "reporter": [ + "text", + "lcov" + ], + "exclude": [ + "**/fixtures/**", + "**/test.js", + "**/test/**" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/execa.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/execa/readme.md b/node_modules/execa/readme.md new file mode 100644 index 00000000..f3f533d9 --- /dev/null +++ b/node_modules/execa/readme.md @@ -0,0 +1,327 @@ +# execa [![Build Status: Linux](https://travis-ci.org/sindresorhus/execa.svg?branch=master)](https://travis-ci.org/sindresorhus/execa) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/x5ajamxtjtt93cqv/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master) + +> A better [`child_process`](https://nodejs.org/api/child_process.html) + + +## Why + +- Promise interface. +- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`. +- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform. +- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why) +- Higher max buffer. 10 MB instead of 200 KB. +- [Executes locally installed binaries by name.](#preferlocal) +- [Cleans up spawned processes when the parent process dies.](#cleanup) + + +## Install + +``` +$ npm install execa +``` + + + + + + +## Usage + +```js +const execa = require('execa'); + +(async () => { + const {stdout} = await execa('echo', ['unicorns']); + console.log(stdout); + //=> 'unicorns' +})(); +``` + +Additional examples: + +```js +const execa = require('execa'); + +(async () => { + // Pipe the child process stdout to the current stdout + execa('echo', ['unicorns']).stdout.pipe(process.stdout); + + + // Run a shell command + const {stdout} = await execa.shell('echo unicorns'); + //=> 'unicorns' + + + // Catching an error + try { + await execa.shell('exit 3'); + } catch (error) { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + killed: false, + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ + } +})(); + +// Catching an error with a sync method +try { + execa.shellSync('exit 3'); +} catch (error) { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ +} +``` + + +## API + +### execa(file, [arguments], [options]) + +Execute a file. + +Think of this as a mix of `child_process.execFile` and `child_process.spawn`. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. + +### execa.stdout(file, [arguments], [options]) + +Same as `execa()`, but returns only `stdout`. + +### execa.stderr(file, [arguments], [options]) + +Same as `execa()`, but returns only `stderr`. + +### execa.shell(command, [options]) + +Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). + +The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. + +### execa.sync(file, [arguments], [options]) + +Execute a file synchronously. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +This method throws an `Error` if the command fails. + +### execa.shellSync(file, [options]) + +Execute a command synchronously through the system shell. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +### options + +Type: `Object` + +#### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory of the child process. + +#### env + +Type: `Object`
+Default: `process.env` + +Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this. + +#### extendEnv + +Type: `boolean`
+Default: `true` + +Set to `false` if you don't want to extend the environment variables when providing the `env` property. + +#### argv0 + +Type: `string` + +Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified. + +#### stdio + +Type: `string[]` `string`
+Default: `pipe` + +Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration. + +#### detached + +Type: `boolean` + +Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached). + +#### uid + +Type: `number` + +Sets the user identity of the process. + +#### gid + +Type: `number` + +Sets the group identity of the process. + +#### shell + +Type: `boolean` `string`
+Default: `false` + +If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows. + +#### stripEof + +Type: `boolean`
+Default: `true` + +[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. + +#### preferLocal + +Type: `boolean`
+Default: `true` + +Prefer locally installed binaries when looking for a binary to execute.
+If you `$ npm install foo`, you can then `execa('foo')`. + +#### localDir + +Type: `string`
+Default: `process.cwd()` + +Preferred path to find locally installed binaries in (use with `preferLocal`). + +#### input + +Type: `string` `Buffer` `stream.Readable` + +Write some input to the `stdin` of your binary.
+Streams are not allowed when using the synchronous methods. + +#### reject + +Type: `boolean`
+Default: `true` + +Setting this to `false` resolves the promise with the error instead of rejecting it. + +#### cleanup + +Type: `boolean`
+Default: `true` + +Keep track of the spawned process and `kill` it when the parent process exits. + +#### encoding + +Type: `string`
+Default: `utf8` + +Specify the character encoding used to decode the `stdout` and `stderr` output. + +#### timeout + +Type: `number`
+Default: `0` + +If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds. + +#### buffer + +Type: `boolean`
+Default: `true` + +Buffer the output from the spawned process. When buffering is disabled you must consume the output of the `stdout` and `stderr` streams because the promise will not be resolved/rejected until they have completed. + +#### maxBuffer + +Type: `number`
+Default: `10000000` (10MB) + +Largest amount of data in bytes allowed on `stdout` or `stderr`. + +#### killSignal + +Type: `string` `number`
+Default: `SIGTERM` + +Signal value to be used when the spawned process will be killed. + +#### stdin + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stdout + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stderr + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### windowsVerbatimArguments + +Type: `boolean`
+Default: `false` + +If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`. + + +## Tips + +### Save and pipe output from a child process + +Let's say you want to show the output of a child process in real-time while also saving it to a variable. + +```js +const execa = require('execa'); +const getStream = require('get-stream'); + +const stream = execa('echo', ['foo']).stdout; + +stream.pipe(process.stdout); + +getStream(stream).then(value => { + console.log('child output:', value); +}); +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/get-stream/buffer-stream.js b/node_modules/get-stream/buffer-stream.js new file mode 100644 index 00000000..4121c8e5 --- /dev/null +++ b/node_modules/get-stream/buffer-stream.js @@ -0,0 +1,51 @@ +'use strict'; +const {PassThrough} = require('stream'); + +module.exports = options => { + options = Object.assign({}, options); + + const {array} = options; + let {encoding} = options; + const buffer = encoding === 'buffer'; + let objectMode = false; + + if (array) { + objectMode = !(encoding || buffer); + } else { + encoding = encoding || 'utf8'; + } + + if (buffer) { + encoding = null; + } + + let len = 0; + const ret = []; + const stream = new PassThrough({objectMode}); + + if (encoding) { + stream.setEncoding(encoding); + } + + stream.on('data', chunk => { + ret.push(chunk); + + if (objectMode) { + len = ret.length; + } else { + len += chunk.length; + } + }); + + stream.getBufferedValue = () => { + if (array) { + return ret; + } + + return buffer ? Buffer.concat(ret, len) : ret.join(''); + }; + + stream.getBufferedLength = () => len; + + return stream; +}; diff --git a/node_modules/get-stream/index.js b/node_modules/get-stream/index.js new file mode 100644 index 00000000..7e5584a6 --- /dev/null +++ b/node_modules/get-stream/index.js @@ -0,0 +1,50 @@ +'use strict'; +const pump = require('pump'); +const bufferStream = require('./buffer-stream'); + +class MaxBufferError extends Error { + constructor() { + super('maxBuffer exceeded'); + this.name = 'MaxBufferError'; + } +} + +function getStream(inputStream, options) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } + + options = Object.assign({maxBuffer: Infinity}, options); + + const {maxBuffer} = options; + + let stream; + return new Promise((resolve, reject) => { + const rejectPromise = error => { + if (error) { // A null check + error.bufferedData = stream.getBufferedValue(); + } + reject(error); + }; + + stream = pump(inputStream, bufferStream(options), error => { + if (error) { + rejectPromise(error); + return; + } + + resolve(); + }); + + stream.on('data', () => { + if (stream.getBufferedLength() > maxBuffer) { + rejectPromise(new MaxBufferError()); + } + }); + }).then(() => stream.getBufferedValue()); +} + +module.exports = getStream; +module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'})); +module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true})); +module.exports.MaxBufferError = MaxBufferError; diff --git a/node_modules/get-stream/license b/node_modules/get-stream/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/get-stream/license @@ -0,0 +1,9 @@ +MIT License + +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. diff --git a/node_modules/get-stream/package.json b/node_modules/get-stream/package.json new file mode 100644 index 00000000..6649c1fb --- /dev/null +++ b/node_modules/get-stream/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "get-stream@4.1.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "get-stream@4.1.0", + "_id": "get-stream@4.1.0", + "_inBundle": false, + "_integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "_location": "/get-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "get-stream@4.1.0", + "name": "get-stream", + "escapedName": "get-stream", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/get-stream/issues" + }, + "dependencies": { + "pump": "^3.0.0" + }, + "description": "Get a stream as a string, buffer, or array", + "devDependencies": { + "ava": "*", + "into-stream": "^3.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "buffer-stream.js" + ], + "homepage": "https://github.com/sindresorhus/get-stream#readme", + "keywords": [ + "get", + "stream", + "promise", + "concat", + "string", + "text", + "buffer", + "read", + "data", + "consume", + "readable", + "readablestream", + "array", + "object" + ], + "license": "MIT", + "name": "get-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/get-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.1.0" +} diff --git a/node_modules/get-stream/readme.md b/node_modules/get-stream/readme.md new file mode 100644 index 00000000..b87a4d37 --- /dev/null +++ b/node_modules/get-stream/readme.md @@ -0,0 +1,123 @@ +# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream) + +> Get a stream as a string, buffer, or array + + +## Install + +``` +$ npm install get-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const getStream = require('get-stream'); + +(async () => { + const stream = fs.createReadStream('unicorn.txt'); + + console.log(await getStream(stream)); + /* + ,,))))))));, + __)))))))))))))), + \|/ -\(((((''''((((((((. + -*-==//////(('' . `)))))), + /|\ ))| o ;-. '((((( ,(, + ( `| / ) ;))))' ,_))^;(~ + | | | ,))((((_ _____------~~~-. %,;(;(>';'~ + o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ + ; ''''```` `: `:::|\,__,%% );`'; ~ + | _ ) / `:|`----' `-' + ______/\/~ | / / + /~;;.____/;;' / ___--,-( `;;;/ + / // _;______;'------~~~~~ /;;/\ / + // | | / ; \;;,\ + (<_ | ; /',/-----' _> + \_| ||_ //~;~~~~~~~~~ + `\_| (,~~ + \~\ + ~~ + */ +})(); +``` + + +## API + +The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. + +### getStream(stream, [options]) + +Get the `stream` as a string. + +#### options + +Type: `Object` + +##### encoding + +Type: `string`
+Default: `utf8` + +[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. + +##### maxBuffer + +Type: `number`
+Default: `Infinity` + +Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `getStream.MaxBufferError` error. + +### getStream.buffer(stream, [options]) + +Get the `stream` as a buffer. + +It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. + +### getStream.array(stream, [options]) + +Get the `stream` as an array of values. + +It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: + +- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). + +- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. + +- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. + + +## Errors + +If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error. + +```js +(async () => { + try { + await getStream(streamThatErrorsAtTheEnd('unicorn')); + } catch (error) { + console.log(error.bufferedData); + //=> 'unicorn' + } +})() +``` + + +## FAQ + +### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)? + +This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package. + + +## Related + +- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/is-stream/index.js b/node_modules/is-stream/index.js new file mode 100644 index 00000000..6f7ec91a --- /dev/null +++ b/node_modules/is-stream/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var isStream = module.exports = function (stream) { + return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; +}; + +isStream.writable = function (stream) { + return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; +}; + +isStream.readable = function (stream) { + return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; +}; + +isStream.duplex = function (stream) { + return isStream.writable(stream) && isStream.readable(stream); +}; + +isStream.transform = function (stream) { + return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; +}; diff --git a/node_modules/is-stream/license b/node_modules/is-stream/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/is-stream/license @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/is-stream/package.json b/node_modules/is-stream/package.json new file mode 100644 index 00000000..2bf5db97 --- /dev/null +++ b/node_modules/is-stream/package.json @@ -0,0 +1,73 @@ +{ + "_args": [ + [ + "is-stream@1.1.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "is-stream@1.1.0", + "_id": "is-stream@1.1.0", + "_inBundle": false, + "_integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "_location": "/is-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-stream@1.1.0", + "name": "is-stream", + "escapedName": "is-stream", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-stream/issues" + }, + "description": "Check if something is a Node.js stream", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.0", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-stream#readme", + "keywords": [ + "stream", + "type", + "streams", + "writable", + "readable", + "duplex", + "transform", + "check", + "detect", + "is" + ], + "license": "MIT", + "name": "is-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/node_modules/is-stream/readme.md b/node_modules/is-stream/readme.md new file mode 100644 index 00000000..d8afce81 --- /dev/null +++ b/node_modules/is-stream/readme.md @@ -0,0 +1,42 @@ +# is-stream [![Build Status](https://travis-ci.org/sindresorhus/is-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/is-stream) + +> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html) + + +## Install + +``` +$ npm install --save is-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const isStream = require('is-stream'); + +isStream(fs.createReadStream('unicorn.png')); +//=> true + +isStream({}); +//=> false +``` + + +## API + +### isStream(stream) + +#### isStream.writable(stream) + +#### isStream.readable(stream) + +#### isStream.duplex(stream) + +#### isStream.transform(stream) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/isexe/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/isexe/README.md b/node_modules/isexe/README.md new file mode 100644 index 00000000..35769e84 --- /dev/null +++ b/node_modules/isexe/README.md @@ -0,0 +1,51 @@ +# isexe + +Minimal module to check if a file is executable, and a normal file. + +Uses `fs.stat` and tests against the `PATHEXT` environment variable on +Windows. + +## USAGE + +```javascript +var isexe = require('isexe') +isexe('some-file-name', function (err, isExe) { + if (err) { + console.error('probably file does not exist or something', err) + } else if (isExe) { + console.error('this thing can be run') + } else { + console.error('cannot be run') + } +}) + +// same thing but synchronous, throws errors +var isExe = isexe.sync('some-file-name') + +// treat errors as just "not executable" +isexe('maybe-missing-file', { ignoreErrors: true }, callback) +var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +``` + +## API + +### `isexe(path, [options], [callback])` + +Check if the path is executable. If no callback provided, and a +global `Promise` object is available, then a Promise will be returned. + +Will raise whatever errors may be raised by `fs.stat`, unless +`options.ignoreErrors` is set to true. + +### `isexe.sync(path, [options])` + +Same as `isexe` but returns the value and throws any errors raised. + +### Options + +* `ignoreErrors` Treat all errors as "no, this is not executable", but + don't raise them. +* `uid` Number to use as the user id +* `gid` Number to use as the group id +* `pathExt` List of path extensions to use instead of `PATHEXT` + environment variable on Windows. diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js new file mode 100644 index 00000000..553fb32b --- /dev/null +++ b/node_modules/isexe/index.js @@ -0,0 +1,57 @@ +var fs = require('fs') +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = require('./windows.js') +} else { + core = require('./mode.js') +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js new file mode 100644 index 00000000..1995ea4a --- /dev/null +++ b/node_modules/isexe/mode.js @@ -0,0 +1,41 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json new file mode 100644 index 00000000..cf2d4708 --- /dev/null +++ b/node_modules/isexe/package.json @@ -0,0 +1,63 @@ +{ + "_args": [ + [ + "isexe@2.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "isexe@2.0.0", + "_id": "isexe@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "_location": "/isexe", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isexe@2.0.0", + "name": "isexe", + "escapedName": "isexe", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/which" + ], + "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "description": "Minimal module to check if a file is executable.", + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/isaacs/isexe#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "isexe", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.0.0" +} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js new file mode 100644 index 00000000..d926df64 --- /dev/null +++ b/node_modules/isexe/test/basic.js @@ -0,0 +1,221 @@ +var t = require('tap') +var fs = require('fs') +var path = require('path') +var fixture = path.resolve(__dirname, 'fixtures') +var meow = fixture + '/meow.cat' +var mine = fixture + '/mine.cat' +var ours = fixture + '/ours.cat' +var fail = fixture + '/fail.false' +var noent = fixture + '/enoent.exe' +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') + +var isWindows = process.platform === 'win32' +var hasAccess = typeof fs.access === 'function' +var winSkip = isWindows && 'windows' +var accessSkip = !hasAccess && 'no fs.access function' +var hasPromise = typeof Promise === 'function' +var promiseSkip = !hasPromise && 'no global Promise' + +function reset () { + delete require.cache[require.resolve('../')] + return require('../') +} + +t.test('setup fixtures', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') + fs.chmodSync(meow, parseInt('0755', 8)) + fs.writeFileSync(fail, '#!/usr/bin/env false\n') + fs.chmodSync(fail, parseInt('0644', 8)) + fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') + fs.chmodSync(mine, parseInt('0744', 8)) + fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') + fs.chmodSync(ours, parseInt('0754', 8)) + t.end() +}) + +t.test('promise', { skip: promiseSkip }, function (t) { + var isexe = reset() + t.test('meow async', function (t) { + isexe(meow).then(function (is) { + t.ok(is) + t.end() + }) + }) + t.test('fail async', function (t) { + isexe(fail).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.test('noent async', function (t) { + isexe(noent).catch(function (er) { + t.ok(er) + t.end() + }) + }) + t.test('noent ignore async', function (t) { + isexe(noent, { ignoreErrors: true }).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.end() +}) + +t.test('no promise', function (t) { + global.Promise = null + var isexe = reset() + t.throws('try to meow a promise', function () { + isexe(meow) + }) + t.end() +}) + +t.test('access', { skip: accessSkip || winSkip }, function (t) { + runTest(t) +}) + +t.test('mode', { skip: winSkip }, function (t) { + delete fs.access + delete fs.accessSync + var isexe = reset() + t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) + t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) + runTest(t) +}) + +t.test('windows', function (t) { + global.TESTING_WINDOWS = true + var pathExt = '.EXE;.CAT;.CMD;.COM' + t.test('pathExt option', function (t) { + runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) + }) + t.test('pathExt env', function (t) { + process.env.PATHEXT = pathExt + runTest(t) + }) + t.test('no pathExt', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: '', skipFail: true }) + }) + t.test('pathext with empty entry', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: ';' + pathExt, skipFail: true }) + }) + t.end() +}) + +t.test('cleanup', function (t) { + rimraf.sync(fixture) + t.end() +}) + +function runTest (t, options) { + var isexe = reset() + + var optionsIgnore = Object.create(options || {}) + optionsIgnore.ignoreErrors = true + + if (!options || !options.skipFail) { + t.notOk(isexe.sync(fail, options)) + } + t.notOk(isexe.sync(noent, optionsIgnore)) + if (!options) { + t.ok(isexe.sync(meow)) + } else { + t.ok(isexe.sync(meow, options)) + } + + t.ok(isexe.sync(mine, options)) + t.ok(isexe.sync(ours, options)) + t.throws(function () { + isexe.sync(noent, options) + }) + + t.test('meow async', function (t) { + if (!options) { + isexe(meow, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } else { + isexe(meow, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } + }) + + t.test('mine async', function (t) { + isexe(mine, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + t.test('ours async', function (t) { + isexe(ours, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + if (!options || !options.skipFail) { + t.test('fail async', function (t) { + isexe(fail, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + } + + t.test('noent async', function (t) { + isexe(noent, options, function (er, is) { + t.ok(er) + t.notOk(is) + t.end() + }) + }) + + t.test('noent ignore async', function (t) { + isexe(noent, optionsIgnore, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.test('directory is not executable', function (t) { + isexe(__dirname, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.end() +} diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js new file mode 100644 index 00000000..34996734 --- /dev/null +++ b/node_modules/isexe/windows.js @@ -0,0 +1,42 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} diff --git a/node_modules/lodash.get/LICENSE b/node_modules/lodash.get/LICENSE new file mode 100644 index 00000000..e0c69d56 --- /dev/null +++ b/node_modules/lodash.get/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.get/README.md b/node_modules/lodash.get/README.md new file mode 100644 index 00000000..90796144 --- /dev/null +++ b/node_modules/lodash.get/README.md @@ -0,0 +1,18 @@ +# lodash.get v4.4.2 + +The [lodash](https://lodash.com/) method `_.get` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.get +``` + +In Node.js: +```js +var get = require('lodash.get'); +``` + +See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.4.2-npm-packages/lodash.get) for more details. diff --git a/node_modules/lodash.get/index.js b/node_modules/lodash.get/index.js new file mode 100644 index 00000000..0eaadec5 --- /dev/null +++ b/node_modules/lodash.get/index.js @@ -0,0 +1,931 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = isKey(path, object) ? [path] : castPath(path); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; diff --git a/node_modules/lodash.get/package.json b/node_modules/lodash.get/package.json new file mode 100644 index 00000000..d0cab0f5 --- /dev/null +++ b/node_modules/lodash.get/package.json @@ -0,0 +1,72 @@ +{ + "_args": [ + [ + "lodash.get@4.4.2", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "lodash.get@4.4.2", + "_id": "lodash.get@4.4.2", + "_inBundle": false, + "_integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "_location": "/lodash.get", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.get@4.4.2", + "name": "lodash.get", + "escapedName": "lodash.get", + "rawSpec": "4.4.2", + "saveSpec": null, + "fetchSpec": "4.4.2" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "_spec": "4.4.2", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "description": "The lodash method `_.get` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "get" + ], + "license": "MIT", + "name": "lodash.get", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.4.2" +} diff --git a/node_modules/lodash.set/LICENSE b/node_modules/lodash.set/LICENSE new file mode 100644 index 00000000..e0c69d56 --- /dev/null +++ b/node_modules/lodash.set/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.set/README.md b/node_modules/lodash.set/README.md new file mode 100644 index 00000000..1f530bc4 --- /dev/null +++ b/node_modules/lodash.set/README.md @@ -0,0 +1,18 @@ +# lodash.set v4.3.2 + +The [lodash](https://lodash.com/) method `_.set` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.set +``` + +In Node.js: +```js +var set = require('lodash.set'); +``` + +See the [documentation](https://lodash.com/docs#set) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.set) for more details. diff --git a/node_modules/lodash.set/index.js b/node_modules/lodash.set/index.js new file mode 100644 index 00000000..9f3ed6b1 --- /dev/null +++ b/node_modules/lodash.set/index.js @@ -0,0 +1,990 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = isKey(path, object) ? [path] : castPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ +function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); +} + +module.exports = set; diff --git a/node_modules/lodash.set/package.json b/node_modules/lodash.set/package.json new file mode 100644 index 00000000..71db1bff --- /dev/null +++ b/node_modules/lodash.set/package.json @@ -0,0 +1,72 @@ +{ + "_args": [ + [ + "lodash.set@4.3.2", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "lodash.set@4.3.2", + "_id": "lodash.set@4.3.2", + "_inBundle": false, + "_integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", + "_location": "/lodash.set", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.set@4.3.2", + "name": "lodash.set", + "escapedName": "lodash.set", + "rawSpec": "4.3.2", + "saveSpec": null, + "fetchSpec": "4.3.2" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "_spec": "4.3.2", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "description": "The lodash method `_.set` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "set" + ], + "license": "MIT", + "name": "lodash.set", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.3.2" +} diff --git a/node_modules/lodash.uniq/LICENSE b/node_modules/lodash.uniq/LICENSE new file mode 100644 index 00000000..e0c69d56 --- /dev/null +++ b/node_modules/lodash.uniq/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.uniq/README.md b/node_modules/lodash.uniq/README.md new file mode 100644 index 00000000..a662a5e3 --- /dev/null +++ b/node_modules/lodash.uniq/README.md @@ -0,0 +1,18 @@ +# lodash.uniq v4.5.0 + +The [lodash](https://lodash.com/) method `_.uniq` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.uniq +``` + +In Node.js: +```js +var uniq = require('lodash.uniq'); +``` + +See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.uniq) for more details. diff --git a/node_modules/lodash.uniq/index.js b/node_modules/lodash.uniq/index.js new file mode 100644 index 00000000..83fce2bc --- /dev/null +++ b/node_modules/lodash.uniq/index.js @@ -0,0 +1,896 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/** + * Checks if a cache value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + Set = getNative(root, 'Set'), + nativeCreate = getNative(Object, 'create'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each + * element is kept. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ +function uniq(array) { + return (array && array.length) + ? baseUniq(array) + : []; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +module.exports = uniq; diff --git a/node_modules/lodash.uniq/package.json b/node_modules/lodash.uniq/package.json new file mode 100644 index 00000000..b5598f9f --- /dev/null +++ b/node_modules/lodash.uniq/package.json @@ -0,0 +1,72 @@ +{ + "_args": [ + [ + "lodash.uniq@4.5.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "lodash.uniq@4.5.0", + "_id": "lodash.uniq@4.5.0", + "_inBundle": false, + "_integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "_location": "/lodash.uniq", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.uniq@4.5.0", + "name": "lodash.uniq", + "escapedName": "lodash.uniq", + "rawSpec": "4.5.0", + "saveSpec": null, + "fetchSpec": "4.5.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "_spec": "4.5.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "description": "The lodash method `_.uniq` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "uniq" + ], + "license": "MIT", + "name": "lodash.uniq", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.5.0" +} diff --git a/node_modules/macos-release/index.d.ts b/node_modules/macos-release/index.d.ts new file mode 100644 index 00000000..c4efcf45 --- /dev/null +++ b/node_modules/macos-release/index.d.ts @@ -0,0 +1,36 @@ +declare const macosRelease: { + /** + Get the name and version of a macOS release from the Darwin version. + + @param release - By default, the current operating system is used, but you can supply a custom [Darwin kernel version](http://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). + + @example + ``` + import * as os from 'os'; + import macosRelease = require('macos-release'); + + // On a macOS Sierra system + + macosRelease(); + //=> {name: 'Sierra', version: '10.12'} + + os.release(); + //=> 13.2.0 + // This is the Darwin kernel version + + macosRelease(os.release()); + //=> {name: 'Sierra', version: '10.12'} + + macosRelease('14.0.0'); + //=> {name: 'Yosemite', version: '10.10'} + ``` + */ + (release?: string): string; + + // TODO: remove this in the next major version, refactor the whole definition to: + // declare function macosRelease(release?: string): string; + // export = macosRelease; + default: typeof macosRelease; +}; + +export = macosRelease; diff --git a/node_modules/macos-release/index.js b/node_modules/macos-release/index.js new file mode 100644 index 00000000..b6eba6b0 --- /dev/null +++ b/node_modules/macos-release/index.js @@ -0,0 +1,32 @@ +'use strict'; +const os = require('os'); + +const nameMap = new Map([ + [19, 'Catalina'], + [18, 'Mojave'], + [17, 'High Sierra'], + [16, 'Sierra'], + [15, 'El Capitan'], + [14, 'Yosemite'], + [13, 'Mavericks'], + [12, 'Mountain Lion'], + [11, 'Lion'], + [10, 'Snow Leopard'], + [9, 'Leopard'], + [8, 'Tiger'], + [7, 'Panther'], + [6, 'Jaguar'], + [5, 'Puma'] +]); + +const macosRelease = release => { + release = Number((release || os.release()).split('.')[0]); + return { + name: nameMap.get(release), + version: '10.' + (release - 4) + }; +}; + +module.exports = macosRelease; +// TODO: remove this in the next major version +module.exports.default = macosRelease; diff --git a/node_modules/macos-release/license b/node_modules/macos-release/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/macos-release/license @@ -0,0 +1,9 @@ +MIT License + +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. diff --git a/node_modules/macos-release/package.json b/node_modules/macos-release/package.json new file mode 100644 index 00000000..b40f3b51 --- /dev/null +++ b/node_modules/macos-release/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "macos-release@2.3.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "macos-release@2.3.0", + "_id": "macos-release@2.3.0", + "_inBundle": false, + "_integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==", + "_location": "/macos-release", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "macos-release@2.3.0", + "name": "macos-release", + "escapedName": "macos-release", + "rawSpec": "2.3.0", + "saveSpec": null, + "fetchSpec": "2.3.0" + }, + "_requiredBy": [ + "/os-name" + ], + "_resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", + "_spec": "2.3.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/macos-release/issues" + }, + "description": "Get the name and version of a macOS release from the Darwin version", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/macos-release#readme", + "keywords": [ + "macos", + "os", + "darwin", + "operating", + "system", + "platform", + "name", + "title", + "release", + "version" + ], + "license": "MIT", + "name": "macos-release", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/macos-release.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.3.0" +} diff --git a/node_modules/macos-release/readme.md b/node_modules/macos-release/readme.md new file mode 100644 index 00000000..2e7b9076 --- /dev/null +++ b/node_modules/macos-release/readme.md @@ -0,0 +1,57 @@ +# macos-release [![Build Status](https://travis-ci.org/sindresorhus/macos-release.svg?branch=master)](https://travis-ci.org/sindresorhus/macos-release) + +> Get the name and version of a macOS release from the Darwin version
+> Example: `13.2.0` → `{name: 'Mavericks', version: '10.9'}` + + +## Install + +``` +$ npm install macos-release +``` + + +## Usage + +```js +const os = require('os'); +const macosRelease = require('macos-release'); + +// On a macOS Sierra system + +macosRelease(); +//=> {name: 'Sierra', version: '10.12'} + +os.release(); +//=> 13.2.0 +// This is the Darwin kernel version + +macosRelease(os.release()); +//=> {name: 'Sierra', version: '10.12'} + +macosRelease('14.0.0'); +//=> {name: 'Yosemite', version: '10.10'} +``` + + +## API + +### macosRelease([release]) + +#### release + +Type: `string` + +By default, the current operating system is used, but you can supply a custom [Darwin kernel version](http://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](http://nodejs.org/api/os.html#os_os_release). + + +## Related + +- [os-name](https://github.com/sindresorhus/os-name) - Get the name of the current operating system. Example: `macOS Sierra` +- [macos-version](https://github.com/sindresorhus/macos-version) - Get the macOS version of the current system. Example: `10.9.3` +- [win-release](https://github.com/sindresorhus/win-release) - Get the name of a Windows version from the release number: `5.1.2600` → `XP` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/mime-db/HISTORY.md b/node_modules/mime-db/HISTORY.md new file mode 100644 index 00000000..8afff373 --- /dev/null +++ b/node_modules/mime-db/HISTORY.md @@ -0,0 +1,439 @@ +1.43.0 / 2020-01-05 +=================== + + * Add `application/x-keepass2` with extension `.kdbx` + * Add extension `.mxmf` to `audio/mobile-xmf` + * Add extensions from IANA for `application/*+xml` types + * Add new upstream MIME types + +1.42.0 / 2019-09-25 +=================== + + * Add `image/vnd.ms-dds` with extension `.dds` + * Add new upstream MIME types + * Remove compressible from `multipart/mixed` + +1.41.0 / 2019-08-30 +=================== + + * Add new upstream MIME types + * Add `application/toml` with extension `.toml` + * Mark `font/ttf` as compressible + +1.40.0 / 2019-04-20 +=================== + + * Add extensions from IANA for `model/*` types + * Add `text/mdx` with extension `.mdx` + +1.39.0 / 2019-04-04 +=================== + + * Add extensions `.siv` and `.sieve` to `application/sieve` + * Add new upstream MIME types + +1.38.0 / 2019-02-04 +=================== + + * Add extension `.nq` to `application/n-quads` + * Add extension `.nt` to `application/n-triples` + * Add new upstream MIME types + * Mark `text/less` as compressible + +1.37.0 / 2018-10-19 +=================== + + * Add extensions to HEIC image types + * Add new upstream MIME types + +1.36.0 / 2018-08-20 +=================== + + * Add Apple file extensions from IANA + * Add extensions from IANA for `image/*` types + * Add new upstream MIME types + +1.35.0 / 2018-07-15 +=================== + + * Add extension `.owl` to `application/rdf+xml` + * Add new upstream MIME types + - Removes extension `.woff` from `application/font-woff` + +1.34.0 / 2018-06-03 +=================== + + * Add extension `.csl` to `application/vnd.citationstyles.style+xml` + * Add extension `.es` to `application/ecmascript` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/turtle` + * Mark all XML-derived types as compressible + +1.33.0 / 2018-02-15 +=================== + + * Add extensions from IANA for `message/*` types + * Add new upstream MIME types + * Fix some incorrect OOXML types + * Remove `application/font-woff2` + +1.32.0 / 2017-11-29 +=================== + + * Add new upstream MIME types + * Update `text/hjson` to registered `application/hjson` + * Add `text/shex` with extension `.shex` + +1.31.0 / 2017-10-25 +=================== + + * Add `application/raml+yaml` with extension `.raml` + * Add `application/wasm` with extension `.wasm` + * Add new `font` type from IANA + * Add new upstream font extensions + * Add new upstream MIME types + * Add extensions for JPEG-2000 images + +1.30.0 / 2017-08-27 +=================== + + * Add `application/vnd.ms-outlook` + * Add `application/x-arj` + * Add extension `.mjs` to `application/javascript` + * Add glTF types and extensions + * Add new upstream MIME types + * Add `text/x-org` + * Add VirtualBox MIME types + * Fix `source` records for `video/*` types that are IANA + * Update `font/opentype` to registered `font/otf` + +1.29.0 / 2017-07-10 +=================== + + * Add `application/fido.trusted-apps+json` + * Add extension `.wadl` to `application/vnd.sun.wadl+xml` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/css` + +1.28.0 / 2017-05-14 +=================== + + * Add new upstream MIME types + * Add extension `.gz` to `application/gzip` + * Update extensions `.md` and `.markdown` to be `text/markdown` + +1.27.0 / 2017-03-16 +=================== + + * Add new upstream MIME types + * Add `image/apng` with extension `.apng` + +1.26.0 / 2017-01-14 +=================== + + * Add new upstream MIME types + * Add extension `.geojson` to `application/geo+json` + +1.25.0 / 2016-11-11 +=================== + + * Add new upstream MIME types + +1.24.0 / 2016-09-18 +=================== + + * Add `audio/mp3` + * Add new upstream MIME types + +1.23.0 / 2016-05-01 +=================== + + * Add new upstream MIME types + * Add extension `.3gpp` to `audio/3gpp` + +1.22.0 / 2016-02-15 +=================== + + * Add `text/slim` + * Add extension `.rng` to `application/xml` + * Add new upstream MIME types + * Fix extension of `application/dash+xml` to be `.mpd` + * Update primary extension to `.m4a` for `audio/mp4` + +1.21.0 / 2016-01-06 +=================== + + * Add Google document types + * Add new upstream MIME types + +1.20.0 / 2015-11-10 +=================== + + * Add `text/x-suse-ymp` + * Add new upstream MIME types + +1.19.0 / 2015-09-17 +=================== + + * Add `application/vnd.apple.pkpass` + * Add new upstream MIME types + +1.18.0 / 2015-09-03 +=================== + + * Add new upstream MIME types + +1.17.0 / 2015-08-13 +=================== + + * Add `application/x-msdos-program` + * Add `audio/g711-0` + * Add `image/vnd.mozilla.apng` + * Add extension `.exe` to `application/x-msdos-program` + +1.16.0 / 2015-07-29 +=================== + + * Add `application/vnd.uri-map` + +1.15.0 / 2015-07-13 +=================== + + * Add `application/x-httpd-php` + +1.14.0 / 2015-06-25 +=================== + + * Add `application/scim+json` + * Add `application/vnd.3gpp.ussd+xml` + * Add `application/vnd.biopax.rdf+xml` + * Add `text/x-processing` + +1.13.0 / 2015-06-07 +=================== + + * Add nginx as a source + * Add `application/x-cocoa` + * Add `application/x-java-archive-diff` + * Add `application/x-makeself` + * Add `application/x-perl` + * Add `application/x-pilot` + * Add `application/x-redhat-package-manager` + * Add `application/x-sea` + * Add `audio/x-m4a` + * Add `audio/x-realaudio` + * Add `image/x-jng` + * Add `text/mathml` + +1.12.0 / 2015-06-05 +=================== + + * Add `application/bdoc` + * Add `application/vnd.hyperdrive+json` + * Add `application/x-bdoc` + * Add extension `.rtf` to `text/rtf` + +1.11.0 / 2015-05-31 +=================== + + * Add `audio/wav` + * Add `audio/wave` + * Add extension `.litcoffee` to `text/coffeescript` + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` + +1.10.0 / 2015-05-19 +=================== + + * Add `application/vnd.balsamiq.bmpr` + * Add `application/vnd.microsoft.portable-executable` + * Add `application/x-ns-proxy-autoconfig` + +1.9.1 / 2015-04-19 +================== + + * Remove `.json` extension from `application/manifest+json` + - This is causing bugs downstream + +1.9.0 / 2015-04-19 +================== + + * Add `application/manifest+json` + * Add `application/vnd.micro+json` + * Add `image/vnd.zbrush.pcx` + * Add `image/x-ms-bmp` + +1.8.0 / 2015-03-13 +================== + + * Add `application/vnd.citationstyles.style+xml` + * Add `application/vnd.fastcopy-disk-image` + * Add `application/vnd.gov.sk.xmldatacontainer+xml` + * Add extension `.jsonld` to `application/ld+json` + +1.7.0 / 2015-02-08 +================== + + * Add `application/vnd.gerber` + * Add `application/vnd.msa-disk-image` + +1.6.1 / 2015-02-05 +================== + + * Community extensions ownership transferred from `node-mime` + +1.6.0 / 2015-01-29 +================== + + * Add `application/jose` + * Add `application/jose+json` + * Add `application/json-seq` + * Add `application/jwk+json` + * Add `application/jwk-set+json` + * Add `application/jwt` + * Add `application/rdap+json` + * Add `application/vnd.gov.sk.e-form+xml` + * Add `application/vnd.ims.imsccv1p3` + +1.5.0 / 2014-12-30 +================== + + * Add `application/vnd.oracle.resource+json` + * Fix various invalid MIME type entries + - `application/mbox+xml` + - `application/oscp-response` + - `application/vwg-multiplexed` + - `audio/g721` + +1.4.0 / 2014-12-21 +================== + + * Add `application/vnd.ims.imsccv1p2` + * Fix various invalid MIME type entries + - `application/vnd-acucobol` + - `application/vnd-curl` + - `application/vnd-dart` + - `application/vnd-dxr` + - `application/vnd-fdf` + - `application/vnd-mif` + - `application/vnd-sema` + - `application/vnd-wap-wmlc` + - `application/vnd.adobe.flash-movie` + - `application/vnd.dece-zip` + - `application/vnd.dvb_service` + - `application/vnd.micrografx-igx` + - `application/vnd.sealed-doc` + - `application/vnd.sealed-eml` + - `application/vnd.sealed-mht` + - `application/vnd.sealed-ppt` + - `application/vnd.sealed-tiff` + - `application/vnd.sealed-xls` + - `application/vnd.sealedmedia.softseal-html` + - `application/vnd.sealedmedia.softseal-pdf` + - `application/vnd.wap-slc` + - `application/vnd.wap-wbxml` + - `audio/vnd.sealedmedia.softseal-mpeg` + - `image/vnd-djvu` + - `image/vnd-svf` + - `image/vnd-wap-wbmp` + - `image/vnd.sealed-png` + - `image/vnd.sealedmedia.softseal-gif` + - `image/vnd.sealedmedia.softseal-jpg` + - `model/vnd-dwf` + - `model/vnd.parasolid.transmit-binary` + - `model/vnd.parasolid.transmit-text` + - `text/vnd-a` + - `text/vnd-curl` + - `text/vnd.wap-wml` + * Remove example template MIME types + - `application/example` + - `audio/example` + - `image/example` + - `message/example` + - `model/example` + - `multipart/example` + - `text/example` + - `video/example` + +1.3.1 / 2014-12-16 +================== + + * Fix missing extensions + - `application/json5` + - `text/hjson` + +1.3.0 / 2014-12-07 +================== + + * Add `application/a2l` + * Add `application/aml` + * Add `application/atfx` + * Add `application/atxml` + * Add `application/cdfx+xml` + * Add `application/dii` + * Add `application/json5` + * Add `application/lxf` + * Add `application/mf4` + * Add `application/vnd.apache.thrift.compact` + * Add `application/vnd.apache.thrift.json` + * Add `application/vnd.coffeescript` + * Add `application/vnd.enphase.envoy` + * Add `application/vnd.ims.imsccv1p1` + * Add `text/csv-schema` + * Add `text/hjson` + * Add `text/markdown` + * Add `text/yaml` + +1.2.0 / 2014-11-09 +================== + + * Add `application/cea` + * Add `application/dit` + * Add `application/vnd.gov.sk.e-form+zip` + * Add `application/vnd.tmd.mediaflex.api+xml` + * Type `application/epub+zip` is now IANA-registered + +1.1.2 / 2014-10-23 +================== + + * Rebuild database for `application/x-www-form-urlencoded` change + +1.1.1 / 2014-10-20 +================== + + * Mark `application/x-www-form-urlencoded` as compressible. + +1.1.0 / 2014-09-28 +================== + + * Add `application/font-woff2` + +1.0.3 / 2014-09-25 +================== + + * Fix engine requirement in package + +1.0.2 / 2014-09-25 +================== + + * Add `application/coap-group+json` + * Add `application/dcd` + * Add `application/vnd.apache.thrift.binary` + * Add `image/vnd.tencent.tap` + * Mark all JSON-derived types as compressible + * Update `text/vtt` data + +1.0.1 / 2014-08-30 +================== + + * Fix extension ordering + +1.0.0 / 2014-08-30 +================== + + * Add `application/atf` + * Add `application/merge-patch+json` + * Add `multipart/x-mixed-replace` + * Add `source: 'apache'` metadata + * Add `source: 'iana'` metadata + * Remove badly-assumed charset data diff --git a/node_modules/mime-db/LICENSE b/node_modules/mime-db/LICENSE new file mode 100644 index 00000000..a7ae8ee9 --- /dev/null +++ b/node_modules/mime-db/LICENSE @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.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. diff --git a/node_modules/mime-db/README.md b/node_modules/mime-db/README.md new file mode 100644 index 00000000..68e3a1ae --- /dev/null +++ b/node_modules/mime-db/README.md @@ -0,0 +1,100 @@ +# mime-db + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][travis-image]][travis-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +This is a database of all mime types. +It consists of a single, public JSON file and does not include any logic, +allowing it to remain as un-opinionated as possible with an API. +It aggregates data from the following sources: + +- http://www.iana.org/assignments/media-types/media-types.xhtml +- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +## Installation + +```bash +npm install mime-db +``` + +### Database Download + +If you're crazy enough to use this in the browser, you can just grab the +JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to +replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) +as the JSON format may change in the future. + +``` +https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json +``` + +## Usage + +```js +var db = require('mime-db'); + +// grab data on .js files +var data = db['application/javascript']; +``` + +## Data Structure + +The JSON file is a map lookup for lowercased mime types. +Each mime type has the following properties: + +- `.source` - where the mime type is defined. + If not set, it's probably a custom media type. + - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) + - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) + - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) +- `.extensions[]` - known extensions associated with this mime type. +- `.compressible` - whether a file of this type can be gzipped. +- `.charset` - the default charset associated with this type, if any. + +If unknown, every property could be `undefined`. + +## Contributing + +To edit the database, only make PRs against `src/custom.json` or +`src/custom-suffix.json`. + +The `src/custom.json` file is a JSON object with the MIME type as the keys +and the values being an object with the following keys: + +- `compressible` - leave out if you don't know, otherwise `true`/`false` to + indicate whether the data represented by the type is typically compressible. +- `extensions` - include an array of file extensions that are associated with + the type. +- `notes` - human-readable notes about the type, typically what the type is. +- `sources` - include an array of URLs of where the MIME type and the associated + extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); + links to type aggregating sites and Wikipedia are _not acceptable_. + +To update the build, run `npm run build`. + +### Adding Custom Media Types + +The best way to get new media types included in this library is to register +them with the IANA. The community registration procedure is outlined in +[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types +registered with the IANA are automatically pulled into this library. + +If that is not possible / feasible, they can be added directly here as a +"custom" type. To do this, it is required to have a primary source that +definitively lists the media type. If an extension is going to be listed as +associateed with this media type, the source must definitively link the +media type and extension as well. + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://badgen.net/npm/node/mime-db +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-db +[npm-url]: https://npmjs.org/package/mime-db +[npm-version-image]: https://badgen.net/npm/v/mime-db +[travis-image]: https://badgen.net/travis/jshttp/mime-db/master +[travis-url]: https://travis-ci.org/jshttp/mime-db diff --git a/node_modules/mime-db/db.json b/node_modules/mime-db/db.json new file mode 100644 index 00000000..cfa3c635 --- /dev/null +++ b/node_modules/mime-db/db.json @@ -0,0 +1,8060 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana", + "compressible": true + }, + "application/3gpp-ims+xml": { + "source": "iana", + "compressible": true + }, + "application/a2l": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/activity+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomdeleted"] + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomsvc"] + }, + "application/atsc-dwd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dwd"] + }, + "application/atsc-held+xml": { + "source": "iana", + "compressible": true, + "extensions": ["held"] + }, + "application/atsc-rdt+json": { + "source": "iana", + "compressible": true + }, + "application/atsc-rsat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsat"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana", + "compressible": true + }, + "application/bacnet-xdd+zip": { + "source": "iana", + "compressible": false + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana", + "compressible": true + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xcs"] + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/cbor": { + "source": "iana" + }, + "application/cbor-seq": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana", + "compressible": true + }, + "application/ccxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdfx"] + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana", + "compressible": true + }, + "application/cellml+xml": { + "source": "iana", + "compressible": true + }, + "application/cfw": { + "source": "iana" + }, + "application/clue+xml": { + "source": "iana", + "compressible": true + }, + "application/clue_info+xml": { + "source": "iana", + "compressible": true + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana", + "compressible": true + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana", + "compressible": true + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana", + "compressible": true + }, + "application/cstadata+xml": { + "source": "iana", + "compressible": true + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cwt": { + "source": "iana" + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpd"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "compressible": true, + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana", + "compressible": true + }, + "application/dicom": { + "source": "iana" + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana", + "compressible": true + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/dns+json": { + "source": "iana", + "compressible": true + }, + "application/dns-message": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dbk"] + }, + "application/dskpp+xml": { + "source": "iana", + "compressible": true + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["ecma","es"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/emergencycalldata.comment+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.control+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.veds+xml": { + "source": "iana", + "compressible": true + }, + "application/emma+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emotionml"] + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana", + "compressible": true + }, + "application/epub+zip": { + "source": "iana", + "compressible": false, + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/expect-ct-report+json": { + "source": "iana", + "compressible": true + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fdt"] + }, + "application/fhir+json": { + "source": "iana", + "compressible": true + }, + "application/fhir+xml": { + "source": "iana", + "compressible": true + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/flexfec": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false + }, + "application/framework-attributes+xml": { + "source": "iana", + "compressible": true + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geopackage+sqlite3": { + "source": "iana" + }, + "application/geoxacml+xml": { + "source": "iana", + "compressible": true + }, + "application/gltf-buffer": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana", + "compressible": true + }, + "application/hjson": { + "extensions": ["hjson"] + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pkg-reply+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana", + "compressible": true + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana", + "compressible": true, + "extensions": ["its"] + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js","mjs"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana", + "compressible": true + }, + "application/kpml-response+xml": { + "source": "iana", + "compressible": true + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lgr"] + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana", + "compressible": true + }, + "application/lost+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana", + "compressible": true + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mads"] + }, + "application/manifest+json": { + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana", + "compressible": true + }, + "application/mathml-presentation+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-deregister+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-envelope+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-protection-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-reception-report+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-user-service-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/media_control+xml": { + "source": "iana", + "compressible": true + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "compressible": true, + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "compressible": true, + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mipc": { + "source": "iana" + }, + "application/mmt-aei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["maei"] + }, + "application/mmt-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musd"] + }, + "application/mods+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/mrb-publish+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/msc-ivr+xml": { + "source": "iana", + "compressible": true + }, + "application/msc-mixer+xml": { + "source": "iana", + "compressible": true + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/multipart-core": { + "source": "iana" + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana", + "extensions": ["nq"] + }, + "application/n-triples": { + "source": "iana", + "extensions": ["nt"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana" + }, + "application/news-groupinfo": { + "source": "iana" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana", + "compressible": true + }, + "application/node": { + "source": "iana" + }, + "application/nss": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odm+xml": { + "source": "iana", + "compressible": true + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg"] + }, + "application/oscore": { + "source": "iana" + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p2p-overlay+xml": { + "source": "iana", + "compressible": true, + "extensions": ["relo"] + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pem-certificate-chain": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana" + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc","sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana", + "compressible": true + }, + "application/pidf-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkcs8-encrypted": { + "source": "iana" + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana", + "compressible": true + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana", + "compressible": true + }, + "application/provenance+xml": { + "source": "iana", + "compressible": true, + "extensions": ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.hpub+zip": { + "source": "iana", + "compressible": false + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana", + "compressible": true + }, + "application/pskc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pskcxml"] + }, + "application/qsig": { + "source": "iana" + }, + "application/raml+yaml": { + "compressible": true, + "extensions": ["raml"] + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf","owl"] + }, + "application/reginfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana", + "compressible": true + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana", + "compressible": true + }, + "application/rls-services+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rapd"] + }, + "application/route-s-tsid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sls"] + }, + "application/route-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rusd"] + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana", + "compressible": true + }, + "application/samlmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/sbml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana", + "compressible": true + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/secevent+jwt": { + "source": "iana" + }, + "application/senml+cbor": { + "source": "iana" + }, + "application/senml+json": { + "source": "iana", + "compressible": true + }, + "application/senml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["senmlx"] + }, + "application/senml-exi": { + "source": "iana" + }, + "application/sensml+cbor": { + "source": "iana" + }, + "application/sensml+json": { + "source": "iana", + "compressible": true + }, + "application/sensml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sensmlx"] + }, + "application/sensml-exi": { + "source": "iana" + }, + "application/sep+xml": { + "source": "iana", + "compressible": true + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana", + "extensions": ["siv","sieve"] + }, + "application/simple-filter+xml": { + "source": "iana", + "compressible": true + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/sipc": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "compressible": true, + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "compressible": true, + "extensions": ["srx"] + }, + "application/spirits-event+xml": { + "source": "iana", + "compressible": true + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ssml"] + }, + "application/stix+json": { + "source": "iana", + "compressible": true + }, + "application/swid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["swidtag"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/taxii+json": { + "source": "iana", + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tei","teicorpus"] + }, + "application/tetra_isi": { + "source": "iana" + }, + "application/thraud+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/tlsrpt+gzip": { + "source": "iana" + }, + "application/tlsrpt+json": { + "source": "iana", + "compressible": true + }, + "application/tnauthlist": { + "source": "iana" + }, + "application/toml": { + "compressible": true, + "extensions": ["toml"] + }, + "application/trickle-ice-sdpfrag": { + "source": "iana" + }, + "application/trig": { + "source": "iana" + }, + "application/ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ttml"] + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/tzif": { + "source": "iana" + }, + "application/tzif-leap": { + "source": "iana" + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-ressheet+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsheet"] + }, + "application/urc-targetdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-uisocketdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana", + "compressible": true + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana", + "compressible": true, + "extensions": ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-v2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mc-signalling-ear": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-payload": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-signalling": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "compressible": false, + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + "source": "iana" + }, + "application/vnd.afpc.foca-charset": { + "source": "iana" + }, + "application/vnd.afpc.foca-codedfont": { + "source": "iana" + }, + "application/vnd.afpc.foca-codepage": { + "source": "iana" + }, + "application/vnd.afpc.modca": { + "source": "iana" + }, + "application/vnd.afpc.modca-formdef": { + "source": "iana" + }, + "application/vnd.afpc.modca-mediummap": { + "source": "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + "source": "iana" + }, + "application/vnd.afpc.modca-overlay": { + "source": "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + "source": "iana" + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amadeus+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.android.ota": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.aplextor.warrp+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpkg"] + }, + "application/vnd.apple.keynote": { + "source": "iana", + "extensions": ["keynote"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.numbers": { + "source": "iana", + "extensions": ["numbers"] + }, + "application/vnd.apple.pages": { + "source": "iana", + "extensions": ["pages"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artisan+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avalon+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.avistar+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.banana-accounting": { + "source": "iana" + }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.byu.uapi+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.ciedi": { + "source": "iana" + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana", + "compressible": true, + "extensions": ["csl"] + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.comicbook-rar": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume.movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecip.rlp": { + "source": "iana" + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "compressible": true, + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.cug+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.sci+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.exstream-empower+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.exstream-package": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.futoin+cbor": { + "source": "iana" + }, + "application/vnd.futoin+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.gentics.grd+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "compressible": true, + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las": { + "source": "iana" + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lasxml"] + }, + "application/vnd.laszip": { + "source": "iana" + }, + "application/vnd.leap+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.liberty-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana" + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nimn": { + "source": "iana" + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-email+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-file+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-folder+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana", + "compressible": true, + "extensions": ["obgx"] + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osm"] + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "iana", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "iana", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "iana", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "iana" + }, + "application/vnd.patentdive": { + "source": "iana" + }, + "application/vnd.patientecommsdoc": { + "source": "iana" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.psfs": { + "source": "iana" + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana" + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.restful+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "compressible": true, + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shade-save-file": { + "source": "iana" + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.shootproof+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sqlite3": { + "source": "iana" + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.veryant.thin": { + "source": "iana" + }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.wv.ssp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.youtube.yt": { + "source": "iana" + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["vxml"] + }, + "application/voucher-cms+json": { + "source": "iana", + "compressible": true + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/wasm": { + "compressible": true, + "extensions": ["wasm"] + }, + "application/watcherinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/webpush-options+json": { + "source": "iana", + "compressible": true + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "compressible": true, + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-keepass2": { + "extensions": ["kdbx"] + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "apache", + "extensions": ["der","crt","pem"] + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana", + "compressible": true + }, + "application/xaml+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xav"] + }, + "application/xcap-caps+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xca"] + }, + "application/xcap-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xel"] + }, + "application/xcap-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/xcap-ns+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xns"] + }, + "application/xcon-conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/xenc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache", + "compressible": true + }, + "application/xliff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xlf"] + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/xmpp+xml": { + "source": "iana", + "compressible": true + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/yin+xml": { + "source": "iana", + "compressible": true, + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "application/zstd": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/aac": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana" + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/flexfec": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/mobile-xmf": { + "source": "iana", + "extensions": ["mxmf"] + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tetra_acelp": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/usac": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dts.uhd": { + "source": "iana" + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/collection": { + "source": "iana", + "extensions": ["ttc"] + }, + "font/otf": { + "source": "iana", + "compressible": true, + "extensions": ["otf"] + }, + "font/sfnt": { + "source": "iana" + }, + "font/ttf": { + "source": "iana", + "compressible": true, + "extensions": ["ttf"] + }, + "font/woff": { + "source": "iana", + "extensions": ["woff"] + }, + "font/woff2": { + "source": "iana", + "extensions": ["woff2"] + }, + "image/aces": { + "source": "iana", + "extensions": ["exr"] + }, + "image/apng": { + "compressible": false, + "extensions": ["apng"] + }, + "image/avci": { + "source": "iana" + }, + "image/avcs": { + "source": "iana" + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana", + "extensions": ["drle"] + }, + "image/emf": { + "source": "iana", + "extensions": ["emf"] + }, + "image/fits": { + "source": "iana", + "extensions": ["fits"] + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/heic": { + "source": "iana", + "extensions": ["heic"] + }, + "image/heic-sequence": { + "source": "iana", + "extensions": ["heics"] + }, + "image/heif": { + "source": "iana", + "extensions": ["heif"] + }, + "image/heif-sequence": { + "source": "iana", + "extensions": ["heifs"] + }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/hsj2": { + "source": "iana", + "extensions": ["hsj2"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jls": { + "source": "iana", + "extensions": ["jls"] + }, + "image/jp2": { + "source": "iana", + "compressible": false, + "extensions": ["jp2","jpg2"] + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg","jpg","jpe"] + }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, + "image/jpm": { + "source": "iana", + "compressible": false, + "extensions": ["jpm"] + }, + "image/jpx": { + "source": "iana", + "compressible": false, + "extensions": ["jpx","jpf"] + }, + "image/jxr": { + "source": "iana", + "extensions": ["jxr"] + }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana", + "extensions": ["pti"] + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana", + "extensions": ["t38"] + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tif","tiff"] + }, + "image/tiff-fx": { + "source": "iana", + "extensions": ["tfx"] + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana", + "extensions": ["azv"] + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana", + "extensions": ["ico"] + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-dds": { + "extensions": ["dds"] + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana", + "extensions": ["tap"] + }, + "image/vnd.valve.source.texture": { + "source": "iana", + "extensions": ["vtf"] + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana", + "extensions": ["pcx"] + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana", + "extensions": ["wmf"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana", + "extensions": [ + "disposition-notification" + ] + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana", + "extensions": ["u8msg"] + }, + "message/global-delivery-status": { + "source": "iana", + "extensions": ["u8dsn"] + }, + "message/global-disposition-notification": { + "source": "iana", + "extensions": ["u8mdn"] + }, + "message/global-headers": { + "source": "iana", + "extensions": ["u8hdr"] + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana", + "extensions": ["wsc"] + }, + "model/3mf": { + "source": "iana", + "extensions": ["3mf"] + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "source": "iana", + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/stl": { + "source": "iana", + "extensions": ["stl"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana", + "compressible": true + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana", + "extensions": ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana", + "extensions": ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana", + "extensions": ["x_t"] + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.usdz+zip": { + "source": "iana", + "compressible": false, + "extensions": ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana", + "extensions": ["bsp"] + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana", + "extensions": ["x3db"] + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana", + "extensions": ["x3dv"] + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana" + }, + "multipart/multilingual": { + "source": "iana" + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/flexfec": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "compressible": true, + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["markdown","md"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mdx": { + "compressible": true, + "extensions": ["mdx"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/shex": { + "extensions": ["shex"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana" + }, + "text/vnd.ficlab.flt": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.gml": { + "source": "iana" + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.hgl": { + "source": "iana" + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.senx.warpscript": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sosi": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/flexfec": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana" + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/smpte291": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vc2": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.mp4vr": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "iana" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vnd.youtube.yt": { + "source": "iana" + }, + "video/vp8": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/node_modules/mime-db/index.js b/node_modules/mime-db/index.js new file mode 100644 index 00000000..551031f6 --- /dev/null +++ b/node_modules/mime-db/index.js @@ -0,0 +1,11 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/node_modules/mime-db/package.json b/node_modules/mime-db/package.json new file mode 100644 index 00000000..a5a1ff1d --- /dev/null +++ b/node_modules/mime-db/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + "mime-db@1.43.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "mime-db@1.43.0", + "_id": "mime-db@1.43.0", + "_inBundle": false, + "_integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", + "_location": "/mime-db", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "mime-db@1.43.0", + "name": "mime-db", + "escapedName": "mime-db", + "rawSpec": "1.43.0", + "saveSpec": null, + "fetchSpec": "1.43.0" + }, + "_requiredBy": [ + "/mime-types" + ], + "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "_spec": "1.43.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/jshttp/mime-db/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + }, + { + "name": "Robert Kieffer", + "email": "robert@broofa.com", + "url": "http://github.com/broofa" + } + ], + "description": "Media Type Database", + "devDependencies": { + "bluebird": "3.7.2", + "co": "4.6.0", + "cogent": "1.0.1", + "csv-parse": "4.8.3", + "eslint": "6.8.0", + "eslint-config-standard": "14.1.0", + "eslint-plugin-import": "2.19.1", + "eslint-plugin-node": "11.0.0", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", + "gnode": "0.1.2", + "mocha": "7.0.0", + "nyc": "15.0.0", + "raw-body": "2.4.1", + "stream-to-array": "2.3.0" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "homepage": "https://github.com/jshttp/mime-db#readme", + "keywords": [ + "mime", + "db", + "type", + "types", + "database", + "charset", + "charsets" + ], + "license": "MIT", + "name": "mime-db", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/mime-db.git" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-travis": "nyc --reporter=text npm test", + "update": "npm run fetch && npm run build", + "version": "node scripts/version-history.js && git add HISTORY.md" + }, + "version": "1.43.0" +} diff --git a/node_modules/mime-types/HISTORY.md b/node_modules/mime-types/HISTORY.md new file mode 100644 index 00000000..db3b311b --- /dev/null +++ b/node_modules/mime-types/HISTORY.md @@ -0,0 +1,325 @@ +2.1.26 / 2020-01-05 +=================== + + * deps: mime-db@1.43.0 + - Add `application/x-keepass2` with extension `.kdbx` + - Add extension `.mxmf` to `audio/mobile-xmf` + - Add extensions from IANA for `application/*+xml` types + - Add new upstream MIME types + +2.1.25 / 2019-11-12 +=================== + + * deps: mime-db@1.42.0 + - Add new upstream MIME types + - Add `application/toml` with extension `.toml` + - Add `image/vnd.ms-dds` with extension `.dds` + +2.1.24 / 2019-04-20 +=================== + + * deps: mime-db@1.40.0 + - Add extensions from IANA for `model/*` types + - Add `text/mdx` with extension `.mdx` + +2.1.23 / 2019-04-17 +=================== + + * deps: mime-db@~1.39.0 + - Add extensions `.siv` and `.sieve` to `application/sieve` + - Add new upstream MIME types + +2.1.22 / 2019-02-14 +=================== + + * deps: mime-db@~1.38.0 + - Add extension `.nq` to `application/n-quads` + - Add extension `.nt` to `application/n-triples` + - Add new upstream MIME types + - Mark `text/less` as compressible + +2.1.21 / 2018-10-19 +=================== + + * deps: mime-db@~1.37.0 + - Add extensions to HEIC image types + - Add new upstream MIME types + +2.1.20 / 2018-08-26 +=================== + + * deps: mime-db@~1.36.0 + - Add Apple file extensions from IANA + - Add extensions from IANA for `image/*` types + - Add new upstream MIME types + +2.1.19 / 2018-07-17 +=================== + + * deps: mime-db@~1.35.0 + - Add extension `.csl` to `application/vnd.citationstyles.style+xml` + - Add extension `.es` to `application/ecmascript` + - Add extension `.owl` to `application/rdf+xml` + - Add new upstream MIME types + - Add UTF-8 as default charset for `text/turtle` + +2.1.18 / 2018-02-16 +=================== + + * deps: mime-db@~1.33.0 + - Add `application/raml+yaml` with extension `.raml` + - Add `application/wasm` with extension `.wasm` + - Add `text/shex` with extension `.shex` + - Add extensions for JPEG-2000 images + - Add extensions from IANA for `message/*` types + - Add new upstream MIME types + - Update font MIME types + - Update `text/hjson` to registered `application/hjson` + +2.1.17 / 2017-09-01 +=================== + + * deps: mime-db@~1.30.0 + - Add `application/vnd.ms-outlook` + - Add `application/x-arj` + - Add extension `.mjs` to `application/javascript` + - Add glTF types and extensions + - Add new upstream MIME types + - Add `text/x-org` + - Add VirtualBox MIME types + - Fix `source` records for `video/*` types that are IANA + - Update `font/opentype` to registered `font/otf` + +2.1.16 / 2017-07-24 +=================== + + * deps: mime-db@~1.29.0 + - Add `application/fido.trusted-apps+json` + - Add extension `.wadl` to `application/vnd.sun.wadl+xml` + - Add extension `.gz` to `application/gzip` + - Add new upstream MIME types + - Update extensions `.md` and `.markdown` to be `text/markdown` + +2.1.15 / 2017-03-23 +=================== + + * deps: mime-db@~1.27.0 + - Add new mime types + - Add `image/apng` + +2.1.14 / 2017-01-14 +=================== + + * deps: mime-db@~1.26.0 + - Add new mime types + +2.1.13 / 2016-11-18 +=================== + + * deps: mime-db@~1.25.0 + - Add new mime types + +2.1.12 / 2016-09-18 +=================== + + * deps: mime-db@~1.24.0 + - Add new mime types + - Add `audio/mp3` + +2.1.11 / 2016-05-01 +=================== + + * deps: mime-db@~1.23.0 + - Add new mime types + +2.1.10 / 2016-02-15 +=================== + + * deps: mime-db@~1.22.0 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +2.1.9 / 2016-01-06 +================== + + * deps: mime-db@~1.21.0 + - Add new mime types + +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + +2.1.7 / 2015-09-20 +================== + + * deps: mime-db@~1.19.0 + - Add new mime types + +2.1.6 / 2015-09-03 +================== + + * deps: mime-db@~1.18.0 + - Add new mime types + +2.1.5 / 2015-08-20 +================== + + * deps: mime-db@~1.17.0 + - Add new mime types + +2.1.4 / 2015-07-30 +================== + + * deps: mime-db@~1.16.0 + - Add new mime types + +2.1.3 / 2015-07-13 +================== + + * deps: mime-db@~1.15.0 + - Add new mime types + +2.1.2 / 2015-06-25 +================== + + * deps: mime-db@~1.14.0 + - Add new mime types + +2.1.1 / 2015-06-08 +================== + + * perf: fix deopt during mapping + +2.1.0 / 2015-06-07 +================== + + * Fix incorrectly treating extension-less file name as extension + - i.e. `'path/to/json'` will no longer return `application/json` + * Fix `.charset(type)` to accept parameters + * Fix `.charset(type)` to match case-insensitive + * Improve generation of extension to MIME mapping + * Refactor internals for readability and no argument reassignment + * Prefer `application/*` MIME types from the same source + * Prefer any type over `application/octet-stream` + * deps: mime-db@~1.13.0 + - Add nginx as a source + - Add new mime types + +2.0.14 / 2015-06-06 +=================== + + * deps: mime-db@~1.12.0 + - Add new mime types + +2.0.13 / 2015-05-31 +=================== + + * deps: mime-db@~1.11.0 + - Add new mime types + +2.0.12 / 2015-05-19 +=================== + + * deps: mime-db@~1.10.0 + - Add new mime types + +2.0.11 / 2015-05-05 +=================== + + * deps: mime-db@~1.9.1 + - Add new mime types + +2.0.10 / 2015-03-13 +=================== + + * deps: mime-db@~1.8.0 + - Add new mime types + +2.0.9 / 2015-02-09 +================== + + * deps: mime-db@~1.7.0 + - Add new mime types + - Community extensions ownership transferred from `node-mime` + +2.0.8 / 2015-01-29 +================== + + * deps: mime-db@~1.6.0 + - Add new mime types + +2.0.7 / 2014-12-30 +================== + + * deps: mime-db@~1.5.0 + - Add new mime types + - Fix various invalid MIME type entries + +2.0.6 / 2014-12-30 +================== + + * deps: mime-db@~1.4.0 + - Add new mime types + - Fix various invalid MIME type entries + - Remove example template MIME types + +2.0.5 / 2014-12-29 +================== + + * deps: mime-db@~1.3.1 + - Fix missing extensions + +2.0.4 / 2014-12-10 +================== + + * deps: mime-db@~1.3.0 + - Add new mime types + +2.0.3 / 2014-11-09 +================== + + * deps: mime-db@~1.2.0 + - Add new mime types + +2.0.2 / 2014-09-28 +================== + + * deps: mime-db@~1.1.0 + - Add new mime types + - Add additional compressible + - Update charsets + +2.0.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + +2.0.0 / 2014-09-02 +================== + + * Use `mime-db` + * Remove `.define()` + +1.0.2 / 2014-08-04 +================== + + * Set charset=utf-8 for `text/javascript` + +1.0.1 / 2014-06-24 +================== + + * Add `text/jsx` type + +1.0.0 / 2014-05-12 +================== + + * Return `false` for unknown types + * Set charset=utf-8 for `application/json` + +0.1.0 / 2014-05-02 +================== + + * Initial release diff --git a/node_modules/mime-types/LICENSE b/node_modules/mime-types/LICENSE new file mode 100644 index 00000000..06166077 --- /dev/null +++ b/node_modules/mime-types/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +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/mime-types/README.md b/node_modules/mime-types/README.md new file mode 100644 index 00000000..1dbef2b5 --- /dev/null +++ b/node_modules/mime-types/README.md @@ -0,0 +1,113 @@ +# mime-types + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +The ultimate javascript content-type utility. + +Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: + +- __No fallbacks.__ Instead of naively returning the first available type, + `mime-types` simply returns `false`, so do + `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. +- No `.define()` functionality +- Bug fixes for `.lookup(path)` + +Otherwise, the API is compatible with `mime` 1.x. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install mime-types +``` + +## Adding Types + +All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), +so open a PR there if you'd like to add mime types. + +## API + +```js +var mime = require('mime-types') +``` + +All functions return `false` if input is invalid or not found. + +### mime.lookup(path) + +Lookup the content-type associated with a file. + +```js +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('folder/.htaccess') // false + +mime.lookup('cats') // false +``` + +### mime.contentType(type) + +Create a full content-type header given a content-type or extension. +When given an extension, `mime.lookup` is used to get the matching +content-type, otherwise the given content-type is used. Then if the +content-type does not already have a `charset` parameter, `mime.charset` +is used to get the default charset and add to the returned content-type. + +```js +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('file.json') // 'application/json; charset=utf-8' +mime.contentType('text/html') // 'text/html; charset=utf-8' +mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' + +// from a full path +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' +``` + +### mime.extension(type) + +Get the default extension for a content-type. + +```js +mime.extension('application/octet-stream') // 'bin' +``` + +### mime.charset(type) + +Lookup the implied default charset of a content-type. + +```js +mime.charset('text/markdown') // 'UTF-8' +``` + +### var type = mime.types[extension] + +A map of content-types by extension. + +### [extensions...] = mime.extensions[type] + +A map of extensions by content-type. + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master +[node-version-image]: https://badgen.net/npm/node/mime-types +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-types +[npm-url]: https://npmjs.org/package/mime-types +[npm-version-image]: https://badgen.net/npm/v/mime-types +[travis-image]: https://badgen.net/travis/jshttp/mime-types/master +[travis-url]: https://travis-ci.org/jshttp/mime-types diff --git a/node_modules/mime-types/index.js b/node_modules/mime-types/index.js new file mode 100644 index 00000000..b9f34d59 --- /dev/null +++ b/node_modules/mime-types/index.js @@ -0,0 +1,188 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} diff --git a/node_modules/mime-types/package.json b/node_modules/mime-types/package.json new file mode 100644 index 00000000..fc92d6ee --- /dev/null +++ b/node_modules/mime-types/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + "mime-types@2.1.26", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "mime-types@2.1.26", + "_id": "mime-types@2.1.26", + "_inBundle": false, + "_integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "_location": "/mime-types", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "mime-types@2.1.26", + "name": "mime-types", + "escapedName": "mime-types", + "rawSpec": "2.1.26", + "saveSpec": null, + "fetchSpec": "2.1.26" + }, + "_requiredBy": [ + "/", + "/form-data", + "/request" + ], + "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "_spec": "2.1.26", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/jshttp/mime-types/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jeremiah Senkpiel", + "email": "fishrock123@rocketmail.com", + "url": "https://searchbeam.jit.su" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "mime-db": "1.43.0" + }, + "description": "The ultimate javascript content-type utility.", + "devDependencies": { + "eslint": "6.8.0", + "eslint-config-standard": "14.1.0", + "eslint-plugin-import": "2.19.1", + "eslint-plugin-node": "11.0.0", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", + "mocha": "7.0.0", + "nyc": "15.0.0" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "homepage": "https://github.com/jshttp/mime-types#readme", + "keywords": [ + "mime", + "types" + ], + "license": "MIT", + "name": "mime-types", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/mime-types.git" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec test/test.js", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-travis": "nyc --reporter=text npm test" + }, + "version": "2.1.26" +} diff --git a/node_modules/minimatch/LICENSE b/node_modules/minimatch/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/minimatch/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/minimatch/README.md b/node_modules/minimatch/README.md new file mode 100644 index 00000000..ad72b813 --- /dev/null +++ b/node_modules/minimatch/README.md @@ -0,0 +1,209 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instantiating the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js new file mode 100644 index 00000000..5b5f8cf4 --- /dev/null +++ b/node_modules/minimatch/minimatch.js @@ -0,0 +1,923 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } + + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json new file mode 100644 index 00000000..1083c01b --- /dev/null +++ b/node_modules/minimatch/package.json @@ -0,0 +1,71 @@ +{ + "_args": [ + [ + "minimatch@3.0.4", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "minimatch@3.0.4", + "_id": "minimatch@3.0.4", + "_inBundle": false, + "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "_location": "/minimatch", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "minimatch@3.0.4", + "name": "minimatch", + "escapedName": "minimatch", + "rawSpec": "3.0.4", + "saveSpec": null, + "fetchSpec": "3.0.4" + }, + "_requiredBy": [ + "/@actions/glob", + "/eslint", + "/eslint-plugin-import", + "/glob", + "/graphql-config", + "/test-exclude" + ], + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "_spec": "3.0.4", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "description": "a glob matcher in javascript", + "devDependencies": { + "tap": "^10.3.2" + }, + "engines": { + "node": "*" + }, + "files": [ + "minimatch.js" + ], + "homepage": "https://github.com/isaacs/minimatch#readme", + "license": "ISC", + "main": "minimatch.js", + "name": "minimatch", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --cov" + }, + "version": "3.0.4" +} diff --git a/node_modules/nice-try/CHANGELOG.md b/node_modules/nice-try/CHANGELOG.md new file mode 100644 index 00000000..9e6baf2f --- /dev/null +++ b/node_modules/nice-try/CHANGELOG.md @@ -0,0 +1,21 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [1.0.5] - 2018-08-25 + +### Changed + +- Removed `prepublish` script from `package.json` + +## [1.0.4] - 2017-08-08 + +### New + +- Added a changelog + +### Changed + +- Ignore `yarn.lock` and `package-lock.json` files \ No newline at end of file diff --git a/node_modules/nice-try/LICENSE b/node_modules/nice-try/LICENSE new file mode 100644 index 00000000..681c8f50 --- /dev/null +++ b/node_modules/nice-try/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Tobias Reich + +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/nice-try/README.md b/node_modules/nice-try/README.md new file mode 100644 index 00000000..5b83b788 --- /dev/null +++ b/node_modules/nice-try/README.md @@ -0,0 +1,32 @@ +# nice-try + +[![Travis Build Status](https://travis-ci.org/electerious/nice-try.svg?branch=master)](https://travis-ci.org/electerious/nice-try) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/8tqb09wrwci3xf8l?svg=true)](https://ci.appveyor.com/project/electerious/nice-try) [![Coverage Status](https://coveralls.io/repos/github/electerious/nice-try/badge.svg?branch=master)](https://coveralls.io/github/electerious/nice-try?branch=master) [![Dependencies](https://david-dm.org/electerious/nice-try.svg)](https://david-dm.org/electerious/nice-try#info=dependencies) [![Greenkeeper badge](https://badges.greenkeeper.io/electerious/nice-try.svg)](https://greenkeeper.io/) + +A function that tries to execute a function and discards any error that occurs. + +## Install + +``` +npm install nice-try +``` + +## Usage + +```js +const niceTry = require('nice-try') + +niceTry(() => JSON.parse('true')) // true +niceTry(() => JSON.parse('truee')) // undefined +niceTry() // undefined +niceTry(true) // undefined +``` + +## API + +### Parameters + +- `fn` `{Function}` Function that might or might not throw an error. + +### Returns + +- `{?*}` Return-value of the function when no error occurred. \ No newline at end of file diff --git a/node_modules/nice-try/package.json b/node_modules/nice-try/package.json new file mode 100644 index 00000000..8ac543d7 --- /dev/null +++ b/node_modules/nice-try/package.json @@ -0,0 +1,64 @@ +{ + "_args": [ + [ + "nice-try@1.0.5", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "nice-try@1.0.5", + "_id": "nice-try@1.0.5", + "_inBundle": false, + "_integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "_location": "/nice-try", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "nice-try@1.0.5", + "name": "nice-try", + "escapedName": "nice-try", + "rawSpec": "1.0.5", + "saveSpec": null, + "fetchSpec": "1.0.5" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "_spec": "1.0.5", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "authors": [ + "Tobias Reich " + ], + "bugs": { + "url": "https://github.com/electerious/nice-try/issues" + }, + "description": "Tries to execute a function and discards any error that occurs", + "devDependencies": { + "chai": "^4.1.2", + "coveralls": "^3.0.0", + "mocha": "^5.1.1", + "nyc": "^12.0.1" + }, + "files": [ + "src" + ], + "homepage": "https://github.com/electerious/nice-try", + "keywords": [ + "try", + "catch", + "error" + ], + "license": "MIT", + "main": "src/index.js", + "name": "nice-try", + "repository": { + "type": "git", + "url": "git+https://github.com/electerious/nice-try.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "nyc node_modules/mocha/bin/_mocha" + }, + "version": "1.0.5" +} diff --git a/node_modules/nice-try/src/index.js b/node_modules/nice-try/src/index.js new file mode 100644 index 00000000..837506f2 --- /dev/null +++ b/node_modules/nice-try/src/index.js @@ -0,0 +1,12 @@ +'use strict' + +/** + * Tries to execute a function and discards any error that occurs. + * @param {Function} fn - Function that might or might not throw an error. + * @returns {?*} Return-value of the function when no error occurred. + */ +module.exports = function(fn) { + + try { return fn() } catch (e) {} + +} \ No newline at end of file diff --git a/node_modules/npm-run-path/index.js b/node_modules/npm-run-path/index.js new file mode 100644 index 00000000..56f31e47 --- /dev/null +++ b/node_modules/npm-run-path/index.js @@ -0,0 +1,39 @@ +'use strict'; +const path = require('path'); +const pathKey = require('path-key'); + +module.exports = opts => { + opts = Object.assign({ + cwd: process.cwd(), + path: process.env[pathKey()] + }, opts); + + let prev; + let pth = path.resolve(opts.cwd); + const ret = []; + + while (prev !== pth) { + ret.push(path.join(pth, 'node_modules/.bin')); + prev = pth; + pth = path.resolve(pth, '..'); + } + + // ensure the running `node` binary is used + ret.push(path.dirname(process.execPath)); + + return ret.concat(opts.path).join(path.delimiter); +}; + +module.exports.env = opts => { + opts = Object.assign({ + env: process.env + }, opts); + + const env = Object.assign({}, opts.env); + const path = pathKey({env}); + + opts.path = env[path]; + env[path] = module.exports(opts); + + return env; +}; diff --git a/node_modules/npm-run-path/license b/node_modules/npm-run-path/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/npm-run-path/license @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/npm-run-path/package.json b/node_modules/npm-run-path/package.json new file mode 100644 index 00000000..b8600cf6 --- /dev/null +++ b/node_modules/npm-run-path/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + "npm-run-path@2.0.2", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "npm-run-path@2.0.2", + "_id": "npm-run-path@2.0.2", + "_inBundle": false, + "_integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "_location": "/npm-run-path", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "npm-run-path@2.0.2", + "name": "npm-run-path", + "escapedName": "npm-run-path", + "rawSpec": "2.0.2", + "saveSpec": null, + "fetchSpec": "2.0.2" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "_spec": "2.0.2", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/npm-run-path/issues" + }, + "dependencies": { + "path-key": "^2.0.0" + }, + "description": "Get your PATH prepended with locally installed binaries", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/npm-run-path#readme", + "keywords": [ + "npm", + "run", + "path", + "package", + "bin", + "binary", + "binaries", + "script", + "cli", + "command-line", + "execute", + "executable" + ], + "license": "MIT", + "name": "npm-run-path", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/npm-run-path.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.2", + "xo": { + "esnext": true + } +} diff --git a/node_modules/npm-run-path/readme.md b/node_modules/npm-run-path/readme.md new file mode 100644 index 00000000..4ff4722a --- /dev/null +++ b/node_modules/npm-run-path/readme.md @@ -0,0 +1,81 @@ +# npm-run-path [![Build Status](https://travis-ci.org/sindresorhus/npm-run-path.svg?branch=master)](https://travis-ci.org/sindresorhus/npm-run-path) + +> Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries + +In [npm run scripts](https://docs.npmjs.com/cli/run-script) you can execute locally installed binaries by name. This enables the same outside npm. + + +## Install + +``` +$ npm install --save npm-run-path +``` + + +## Usage + +```js +const childProcess = require('child_process'); +const npmRunPath = require('npm-run-path'); + +console.log(process.env.PATH); +//=> '/usr/local/bin' + +console.log(npmRunPath()); +//=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin' + +// `foo` is a locally installed binary +childProcess.execFileSync('foo', { + env: npmRunPath.env() +}); +``` + + +## API + +### npmRunPath([options]) + +#### options + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Working directory. + +##### path + +Type: `string`
+Default: [`PATH`](https://github.com/sindresorhus/path-key) + +PATH to be appended.
+Set it to an empty string to exclude the default PATH. + +### npmRunPath.env([options]) + +#### options + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Working directory. + +##### env + +Type: `Object` + +Accepts an object of environment variables, like `process.env`, and modifies the PATH using the correct [PATH key](https://github.com/sindresorhus/path-key). Use this if you're modifying the PATH for use in the `child_process` options. + + +## Related + +- [npm-run-path-cli](https://github.com/sindresorhus/npm-run-path-cli) - CLI for this module +- [execa](https://github.com/sindresorhus/execa) - Execute a locally installed binary + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/octokit-pagination-methods/CODE_OF_CONDUCT.md b/node_modules/octokit-pagination-methods/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..8124607b --- /dev/null +++ b/node_modules/octokit-pagination-methods/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at opensource+octokit@github.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/node_modules/octokit-pagination-methods/LICENSE b/node_modules/octokit-pagination-methods/LICENSE new file mode 100644 index 00000000..4c0d268a --- /dev/null +++ b/node_modules/octokit-pagination-methods/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer) +Copyright (c) 2017-2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/octokit-pagination-methods/README.md b/node_modules/octokit-pagination-methods/README.md new file mode 100644 index 00000000..0dd63416 --- /dev/null +++ b/node_modules/octokit-pagination-methods/README.md @@ -0,0 +1,42 @@ +# octokit-pagination-methods + +> Legacy Octokit pagination methods from v15 + +[![Build Status](https://travis-ci.com/gr2m/octokit-pagination-methods.svg?branch=master)](https://travis-ci.com/gr2m/octokit-pagination-methods) +[![Coverage Status](https://coveralls.io/repos/gr2m/octokit-pagination-methods/badge.svg?branch=master)](https://coveralls.io/github/gr2m/octokit-pagination-methods?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/gr2m/octokit-pagination-methods.svg)](https://greenkeeper.io/) + +Several pagination methods such as `octokit.hasNextPage()` and `octokit.getNextPage()` have been removed from `@octokit/request` in v16.0.0 in favor of `octokit.paginate()`. This plugin brings back the methods to ease the upgrade to v16. + +## Usage + +```js +const Octokit = require('@octokit/rest') + .plugin('octokit-pagination-methods') +const octokit = new Octokit() + +octokit.issues.getForRepo() + + .then(async response => { + // returns true/false + octokit.hasNextPage(response) + octokit.hasPreviousPage(response) + octokit.hasFirstPage(response) + octokit.hasLastPage(response) + + // fetch other pages + const nextPage = await octokit.getNextPage(response) + const previousPage = await octokit.getPreviousPage(response) + const firstPage = await octokit.getFirstPage(response) + const lastPage = await octokit.getLastPage(response) + }) +``` + +## Credit + +These methods have originally been created for `node-github` by [@mikedeboer](https://github.com/mikedeboer) +while working at Cloud9 IDE, Inc. It was adopted and renamed by GitHub in 2017. + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/octokit-pagination-methods/index.js b/node_modules/octokit-pagination-methods/index.js new file mode 100644 index 00000000..f7474a72 --- /dev/null +++ b/node_modules/octokit-pagination-methods/index.js @@ -0,0 +1,12 @@ +module.exports = paginationMethodsPlugin + +function paginationMethodsPlugin (octokit) { + octokit.getFirstPage = require('./lib/get-first-page').bind(null, octokit) + octokit.getLastPage = require('./lib/get-last-page').bind(null, octokit) + octokit.getNextPage = require('./lib/get-next-page').bind(null, octokit) + octokit.getPreviousPage = require('./lib/get-previous-page').bind(null, octokit) + octokit.hasFirstPage = require('./lib/has-first-page') + octokit.hasLastPage = require('./lib/has-last-page') + octokit.hasNextPage = require('./lib/has-next-page') + octokit.hasPreviousPage = require('./lib/has-previous-page') +} diff --git a/node_modules/octokit-pagination-methods/lib/deprecate.js b/node_modules/octokit-pagination-methods/lib/deprecate.js new file mode 100644 index 00000000..c56f7ab6 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/deprecate.js @@ -0,0 +1,12 @@ +module.exports = deprecate + +const loggedMessages = {} + +function deprecate (message) { + if (loggedMessages[message]) { + return + } + + console.warn(`DEPRECATED (@octokit/rest): ${message}`) + loggedMessages[message] = 1 +} diff --git a/node_modules/octokit-pagination-methods/lib/get-first-page.js b/node_modules/octokit-pagination-methods/lib/get-first-page.js new file mode 100644 index 00000000..5f2dff9e --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-first-page.js @@ -0,0 +1,7 @@ +module.exports = getFirstPage + +const getPage = require('./get-page') + +function getFirstPage (octokit, link, headers) { + return getPage(octokit, link, 'first', headers) +} diff --git a/node_modules/octokit-pagination-methods/lib/get-last-page.js b/node_modules/octokit-pagination-methods/lib/get-last-page.js new file mode 100644 index 00000000..9f862462 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-last-page.js @@ -0,0 +1,7 @@ +module.exports = getLastPage + +const getPage = require('./get-page') + +function getLastPage (octokit, link, headers) { + return getPage(octokit, link, 'last', headers) +} diff --git a/node_modules/octokit-pagination-methods/lib/get-next-page.js b/node_modules/octokit-pagination-methods/lib/get-next-page.js new file mode 100644 index 00000000..fbd5e94e --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-next-page.js @@ -0,0 +1,7 @@ +module.exports = getNextPage + +const getPage = require('./get-page') + +function getNextPage (octokit, link, headers) { + return getPage(octokit, link, 'next', headers) +} diff --git a/node_modules/octokit-pagination-methods/lib/get-page-links.js b/node_modules/octokit-pagination-methods/lib/get-page-links.js new file mode 100644 index 00000000..585eadbe --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-page-links.js @@ -0,0 +1,15 @@ +module.exports = getPageLinks + +function getPageLinks (link) { + link = link.link || link.headers.link || '' + + const links = {} + + // link format: + // '; rel="next", ; rel="last"' + link.replace(/<([^>]*)>;\s*rel="([\w]*)"/g, (m, uri, type) => { + links[type] = uri + }) + + return links +} diff --git a/node_modules/octokit-pagination-methods/lib/get-page.js b/node_modules/octokit-pagination-methods/lib/get-page.js new file mode 100644 index 00000000..d60fe734 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-page.js @@ -0,0 +1,38 @@ +module.exports = getPage + +const deprecate = require('./deprecate') +const getPageLinks = require('./get-page-links') +const HttpError = require('./http-error') + +function getPage (octokit, link, which, headers) { + deprecate(`octokit.get${which.charAt(0).toUpperCase() + which.slice(1)}Page() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + const url = getPageLinks(link)[which] + + if (!url) { + const urlError = new HttpError(`No ${which} page found`, 404) + return Promise.reject(urlError) + } + + const requestOptions = { + url, + headers: applyAcceptHeader(link, headers) + } + + const promise = octokit.request(requestOptions) + + return promise +} + +function applyAcceptHeader (res, headers) { + const previous = res.headers && res.headers['x-github-media-type'] + + if (!previous || (headers && headers.accept)) { + return headers + } + headers = headers || {} + headers.accept = 'application/vnd.' + previous + .replace('; param=', '.') + .replace('; format=', '+') + + return headers +} diff --git a/node_modules/octokit-pagination-methods/lib/get-previous-page.js b/node_modules/octokit-pagination-methods/lib/get-previous-page.js new file mode 100644 index 00000000..0477eeb8 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-previous-page.js @@ -0,0 +1,7 @@ +module.exports = getPreviousPage + +const getPage = require('./get-page') + +function getPreviousPage (octokit, link, headers) { + return getPage(octokit, link, 'prev', headers) +} diff --git a/node_modules/octokit-pagination-methods/lib/has-first-page.js b/node_modules/octokit-pagination-methods/lib/has-first-page.js new file mode 100644 index 00000000..3814b1f6 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/has-first-page.js @@ -0,0 +1,9 @@ +module.exports = hasFirstPage + +const deprecate = require('./deprecate') +const getPageLinks = require('./get-page-links') + +function hasFirstPage (link) { + deprecate(`octokit.hasFirstPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).first +} diff --git a/node_modules/octokit-pagination-methods/lib/has-last-page.js b/node_modules/octokit-pagination-methods/lib/has-last-page.js new file mode 100644 index 00000000..10c12e35 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/has-last-page.js @@ -0,0 +1,9 @@ +module.exports = hasLastPage + +const deprecate = require('./deprecate') +const getPageLinks = require('./get-page-links') + +function hasLastPage (link) { + deprecate(`octokit.hasLastPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).last +} diff --git a/node_modules/octokit-pagination-methods/lib/has-next-page.js b/node_modules/octokit-pagination-methods/lib/has-next-page.js new file mode 100644 index 00000000..1015ccd7 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/has-next-page.js @@ -0,0 +1,9 @@ +module.exports = hasNextPage + +const deprecate = require('./deprecate') +const getPageLinks = require('./get-page-links') + +function hasNextPage (link) { + deprecate(`octokit.hasNextPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).next +} diff --git a/node_modules/octokit-pagination-methods/lib/has-previous-page.js b/node_modules/octokit-pagination-methods/lib/has-previous-page.js new file mode 100644 index 00000000..49e09260 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/has-previous-page.js @@ -0,0 +1,9 @@ +module.exports = hasPreviousPage + +const deprecate = require('./deprecate') +const getPageLinks = require('./get-page-links') + +function hasPreviousPage (link) { + deprecate(`octokit.hasPreviousPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).prev +} diff --git a/node_modules/octokit-pagination-methods/lib/http-error.js b/node_modules/octokit-pagination-methods/lib/http-error.js new file mode 100644 index 00000000..8eb9f2f6 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/http-error.js @@ -0,0 +1,15 @@ +module.exports = class HttpError extends Error { + constructor (message, code, headers) { + 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.code = code + this.headers = headers + } +} diff --git a/node_modules/octokit-pagination-methods/package.json b/node_modules/octokit-pagination-methods/package.json new file mode 100644 index 00000000..b5f4a7fb --- /dev/null +++ b/node_modules/octokit-pagination-methods/package.json @@ -0,0 +1,79 @@ +{ + "_args": [ + [ + "octokit-pagination-methods@1.1.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "octokit-pagination-methods@1.1.0", + "_id": "octokit-pagination-methods@1.1.0", + "_inBundle": false, + "_integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==", + "_location": "/octokit-pagination-methods", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "octokit-pagination-methods@1.1.0", + "name": "octokit-pagination-methods", + "escapedName": "octokit-pagination-methods", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "bugs": { + "url": "https://github.com/gr2m/octokit-pagination-methods/issues" + }, + "dependencies": {}, + "description": "Legacy Octokit pagination methods from v15", + "devDependencies": { + "@octokit/rest": "github:octokit/rest.js#next", + "coveralls": "^3.0.2", + "nock": "^10.0.2", + "semantic-release": "^15.10.8", + "simple-mock": "^0.8.0", + "standard": "^12.0.1", + "standard-markdown": "^5.0.1", + "tap": "^12.0.1" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/gr2m/octokit-pagination-methods#readme", + "keywords": [ + "octokit", + "github", + "api", + "rest", + "plugin" + ], + "license": "MIT", + "main": "index.js", + "name": "octokit-pagination-methods", + "publishConfig": { + "access": "public", + "tag": "latest" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/octokit-pagination-methods.git" + }, + "scripts": { + "coverage": "tap --coverage-report=html", + "coverage:upload": "npm run test && tap --coverage-report=text-lcov | coveralls", + "pretest": "standard && standard-markdown *.md", + "semantic-release": "semantic-release", + "test": "tap --coverage test.js" + }, + "version": "1.1.0" +} diff --git a/node_modules/octokit-pagination-methods/test.js b/node_modules/octokit-pagination-methods/test.js new file mode 100644 index 00000000..d16f4a2a --- /dev/null +++ b/node_modules/octokit-pagination-methods/test.js @@ -0,0 +1,93 @@ +const test = require('tap').test +const nock = require('nock') + +const Octokit = require('@octokit/rest') + .plugin(require('.')) + +test('@octokit/pagination-methods', (t) => { + nock('https://api.github.com', { + reqheaders: { + authorization: 'token secrettoken123' + } + }) + .get('/organizations') + .query({ page: 3, per_page: 1 }) + .reply(200, [{}], { + 'Link': '; rel="next", ; rel="first", ; rel="prev"', + 'X-GitHub-Media-Type': 'octokit.v3; format=json' + }) + .get('/organizations') + .query({ page: 1, per_page: 1 }) + .reply(200, [{}]) + .get('/organizations') + .query({ page: 2, per_page: 1 }) + .reply(200, [{}]) + .get('/organizations') + .query({ page: 4, per_page: 1 }) + .reply(404, {}) + + const octokit = new Octokit() + + octokit.authenticate({ + type: 'token', + token: 'secrettoken123' + }) + + return octokit.orgs.getAll({ + page: 3, + per_page: 1 + }) + + .then((response) => { + t.ok(octokit.hasNextPage(response)) + t.ok(octokit.hasPreviousPage(response)) + t.ok(octokit.hasFirstPage(response)) + t.notOk(octokit.hasLastPage(response)) + + const noop = () => {} + + return Promise.all([ + octokit.getFirstPage(response) + .then(response => { + t.doesNotThrow(() => { + octokit.hasPreviousPage(response) + }) + t.notOk(octokit.hasPreviousPage(response)) + }), + octokit.getPreviousPage(response, { foo: 'bar', accept: 'application/vnd.octokit.v3+json' }), + octokit.getNextPage(response).catch(noop), + octokit.getLastPage(response, { foo: 'bar' }) + .catch(error => { + t.equals(error.code, 404) + }), + // test error with promise + octokit.getLastPage(response).catch(noop) + ]) + }) + + .catch(t.error) +}) + +test('carries accept header correctly', () => { + nock('https://api.github.com', { + reqheaders: { + accept: 'application/vnd.github.hellcat-preview+json' + } + }) + .get('/user/teams') + .query({ per_page: 1 }) + .reply(200, [{}], { + 'Link': '; rel="next"', + 'X-GitHub-Media-Type': 'github; param=hellcat-preview; format=json' + }) + .get('/user/teams') + .query({ page: 2, per_page: 1 }) + .reply(200, []) + + const octokit = new Octokit() + + return octokit.users.getTeams({ per_page: 1 }) + .then(response => { + return octokit.getNextPage(response) + }) +}) diff --git a/node_modules/once/LICENSE b/node_modules/once/LICENSE new file mode 100644 index 00000000..19129e31 --- /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 00000000..1f1ffca9 --- /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 00000000..23540673 --- /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 00000000..784d856f --- /dev/null +++ b/node_modules/once/package.json @@ -0,0 +1,75 @@ +{ + "_args": [ + [ + "once@1.4.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "once@1.4.0", + "_id": "once@1.4.0", + "_inBundle": false, + "_integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "_location": "/once", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "once@1.4.0", + "name": "once", + "escapedName": "once", + "rawSpec": "1.4.0", + "saveSpec": null, + "fetchSpec": "1.4.0" + }, + "_requiredBy": [ + "/@octokit/request", + "/@octokit/request-error", + "/@octokit/rest", + "/end-of-stream", + "/glob", + "/inflight", + "/pump" + ], + "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "_spec": "1.4.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/once/issues" + }, + "dependencies": { + "wrappy": "1" + }, + "description": "Run a function exactly one time", + "devDependencies": { + "tap": "^7.0.1" + }, + "directories": { + "test": "test" + }, + "files": [ + "once.js" + ], + "homepage": "https://github.com/isaacs/once#readme", + "keywords": [ + "once", + "function", + "one", + "single" + ], + "license": "ISC", + "main": "once.js", + "name": "once", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.4.0" +} diff --git a/node_modules/os-name/index.d.ts b/node_modules/os-name/index.d.ts new file mode 100644 index 00000000..b1246ac2 --- /dev/null +++ b/node_modules/os-name/index.d.ts @@ -0,0 +1,37 @@ +/// + +/** +Get the name of the current operating system. + +By default, the name of the current operating system is returned. + +@param platform - Custom platform name. +@param release - Custom release name. + +@example +``` +import * as os fron 'os'; +import osName = require('os-name'); + +// On a macOS Sierra system + +osName(); +//=> 'macOS Sierra' + +osName(os.platform(), os.release()); +//=> 'macOS Sierra' + +osName('darwin', '14.0.0'); +//=> 'OS X Yosemite' + +osName('linux', '3.13.0-24-generic'); +//=> 'Linux 3.13' + +osName('win32', '6.3.9600'); +//=> 'Windows 8.1' +``` +*/ +declare function osName(): string; +declare function osName(platform: NodeJS.Platform, release: string): string; + +export = osName; diff --git a/node_modules/os-name/index.js b/node_modules/os-name/index.js new file mode 100644 index 00000000..f1287d5f --- /dev/null +++ b/node_modules/os-name/index.js @@ -0,0 +1,46 @@ +'use strict'; +const os = require('os'); +const macosRelease = require('macos-release'); +const winRelease = require('windows-release'); + +const osName = (platform, release) => { + if (!platform && release) { + throw new Error('You can\'t specify a `release` without specifying `platform`'); + } + + platform = platform || os.platform(); + + let id; + + if (platform === 'darwin') { + if (!release && os.platform() === 'darwin') { + release = os.release(); + } + + const prefix = release ? (Number(release.split('.')[0]) > 15 ? 'macOS' : 'OS X') : 'macOS'; + id = release ? macosRelease(release).name : ''; + return prefix + (id ? ' ' + id : ''); + } + + if (platform === 'linux') { + if (!release && os.platform() === 'linux') { + release = os.release(); + } + + id = release ? release.replace(/^(\d+\.\d+).*/, '$1') : ''; + return 'Linux' + (id ? ' ' + id : ''); + } + + if (platform === 'win32') { + if (!release && os.platform() === 'win32') { + release = os.release(); + } + + id = release ? winRelease(release) : ''; + return 'Windows' + (id ? ' ' + id : ''); + } + + return platform; +}; + +module.exports = osName; diff --git a/node_modules/os-name/license b/node_modules/os-name/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/os-name/license @@ -0,0 +1,9 @@ +MIT License + +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. diff --git a/node_modules/os-name/package.json b/node_modules/os-name/package.json new file mode 100644 index 00000000..6829568f --- /dev/null +++ b/node_modules/os-name/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + "os-name@3.1.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "os-name@3.1.0", + "_id": "os-name@3.1.0", + "_inBundle": false, + "_integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==", + "_location": "/os-name", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "os-name@3.1.0", + "name": "os-name", + "escapedName": "os-name", + "rawSpec": "3.1.0", + "saveSpec": null, + "fetchSpec": "3.1.0" + }, + "_requiredBy": [ + "/universal-user-agent" + ], + "_resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", + "_spec": "3.1.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/os-name/issues" + }, + "dependencies": { + "macos-release": "^2.2.0", + "windows-release": "^3.1.0" + }, + "description": "Get the name of the current operating system. Example: macOS Sierra", + "devDependencies": { + "@types/node": "^11.13.0", + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/os-name#readme", + "keywords": [ + "os", + "operating", + "system", + "platform", + "name", + "title", + "release", + "version", + "macos", + "windows", + "linux" + ], + "license": "MIT", + "name": "os-name", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-name.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.1.0" +} diff --git a/node_modules/os-name/readme.md b/node_modules/os-name/readme.md new file mode 100644 index 00000000..35812b25 --- /dev/null +++ b/node_modules/os-name/readme.md @@ -0,0 +1,64 @@ +# os-name [![Build Status](https://travis-ci.org/sindresorhus/os-name.svg?branch=master)](https://travis-ci.org/sindresorhus/os-name) + +> Get the name of the current operating system
+> Example: `macOS Sierra` + +Useful for analytics and debugging. + + +## Install + +``` +$ npm install os-name +``` + + +## Usage + +```js +const os = require('os'); +const osName = require('os-name'); + +// On a macOS Sierra system + +osName(); +//=> 'macOS Sierra' + +osName(os.platform(), os.release()); +//=> 'macOS Sierra' + +osName('darwin', '14.0.0'); +//=> 'OS X Yosemite' + +osName('linux', '3.13.0-24-generic'); +//=> 'Linux 3.13' + +osName('win32', '6.3.9600'); +//=> 'Windows 8.1' +``` + + +## API + +### osName([platform, release]) + +By default, the name of the current operating system is returned. + +You can optionally supply a custom [`os.platform()`](https://nodejs.org/api/os.html#os_os_platform) and [`os.release()`](https://nodejs.org/api/os.html#os_os_release). + +Check out [`getos`](https://github.com/wblankenship/getos) if you need the Linux distribution name. + + +## Contributing + +Production systems depend on this package for logging / tracking. Please be careful when introducing new output, and adhere to existing output format (whitespace, capitalization, etc.). + + +## Related + +- [os-name-cli](https://github.com/sindresorhus/os-name-cli) - CLI for this module + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-finally/index.js b/node_modules/p-finally/index.js new file mode 100644 index 00000000..52b7b49c --- /dev/null +++ b/node_modules/p-finally/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = (promise, onFinally) => { + onFinally = onFinally || (() => {}); + + return promise.then( + val => new Promise(resolve => { + resolve(onFinally()); + }).then(() => val), + err => new Promise(resolve => { + resolve(onFinally()); + }).then(() => { + throw err; + }) + ); +}; diff --git a/node_modules/p-finally/license b/node_modules/p-finally/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/p-finally/license @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/p-finally/package.json b/node_modules/p-finally/package.json new file mode 100644 index 00000000..0d926c46 --- /dev/null +++ b/node_modules/p-finally/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + "p-finally@1.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "p-finally@1.0.0", + "_id": "p-finally@1.0.0", + "_inBundle": false, + "_integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "_location": "/p-finally", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-finally@1.0.0", + "name": "p-finally", + "escapedName": "p-finally", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-finally/issues" + }, + "description": "`Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/p-finally#readme", + "keywords": [ + "promise", + "finally", + "handler", + "function", + "async", + "await", + "promises", + "settled", + "ponyfill", + "polyfill", + "shim", + "bluebird" + ], + "license": "MIT", + "name": "p-finally", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-finally.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/p-finally/readme.md b/node_modules/p-finally/readme.md new file mode 100644 index 00000000..09ef3641 --- /dev/null +++ b/node_modules/p-finally/readme.md @@ -0,0 +1,47 @@ +# p-finally [![Build Status](https://travis-ci.org/sindresorhus/p-finally.svg?branch=master)](https://travis-ci.org/sindresorhus/p-finally) + +> [`Promise#finally()`](https://github.com/tc39/proposal-promise-finally) [ponyfill](https://ponyfill.com) - Invoked when the promise is settled regardless of outcome + +Useful for cleanup. + + +## Install + +``` +$ npm install --save p-finally +``` + + +## Usage + +```js +const pFinally = require('p-finally'); + +const dir = createTempDir(); + +pFinally(write(dir), () => cleanup(dir)); +``` + + +## API + +### pFinally(promise, [onFinally]) + +Returns a `Promise`. + +#### onFinally + +Type: `Function` + +Note: Throwing or returning a rejected promise will reject `promise` with the rejection reason. + + +## Related + +- [p-try](https://github.com/sindresorhus/p-try) - `Promise#try()` ponyfill - Starts a promise chain +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-key/index.js b/node_modules/path-key/index.js new file mode 100644 index 00000000..62c8250a --- /dev/null +++ b/node_modules/path-key/index.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = opts => { + opts = opts || {}; + + const env = opts.env || process.env; + const platform = opts.platform || process.platform; + + if (platform !== 'win32') { + return 'PATH'; + } + + return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; +}; diff --git a/node_modules/path-key/license b/node_modules/path-key/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/path-key/license @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/path-key/package.json b/node_modules/path-key/package.json new file mode 100644 index 00000000..b782074b --- /dev/null +++ b/node_modules/path-key/package.json @@ -0,0 +1,75 @@ +{ + "_args": [ + [ + "path-key@2.0.1", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "path-key@2.0.1", + "_id": "path-key@2.0.1", + "_inBundle": false, + "_integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "_location": "/path-key", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-key@2.0.1", + "name": "path-key", + "escapedName": "path-key", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/cross-spawn", + "/npm-run-path" + ], + "_resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/path-key/issues" + }, + "description": "Get the PATH environment variable key cross-platform", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/path-key#readme", + "keywords": [ + "path", + "key", + "environment", + "env", + "variable", + "var", + "get", + "cross-platform", + "windows" + ], + "license": "MIT", + "name": "path-key", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-key.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.1", + "xo": { + "esnext": true + } +} diff --git a/node_modules/path-key/readme.md b/node_modules/path-key/readme.md new file mode 100644 index 00000000..cb5710aa --- /dev/null +++ b/node_modules/path-key/readme.md @@ -0,0 +1,51 @@ +# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key) + +> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform + +It's usually `PATH`, but on Windows it can be any casing like `Path`... + + +## Install + +``` +$ npm install --save path-key +``` + + +## Usage + +```js +const pathKey = require('path-key'); + +const key = pathKey(); +//=> 'PATH' + +const PATH = process.env[key]; +//=> '/usr/local/bin:/usr/bin:/bin' +``` + + +## API + +### pathKey([options]) + +#### options + +##### env + +Type: `Object`
+Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env) + +Use a custom environment variables object. + +#### platform + +Type: `string`
+Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform) + +Get the PATH key for a specific platform. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pump/LICENSE b/node_modules/pump/LICENSE new file mode 100644 index 00000000..757562ec --- /dev/null +++ b/node_modules/pump/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +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/pump/README.md b/node_modules/pump/README.md new file mode 100644 index 00000000..4c81471a --- /dev/null +++ b/node_modules/pump/README.md @@ -0,0 +1,65 @@ +# pump + +pump is a small node module that pipes streams together and destroys all of them if one of them closes. + +``` +npm install pump +``` + +[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump) + +## What problem does it solve? + +When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error. +You are also not able to provide a callback to tell when then pipe has finished. + +pump does these two things for you + +## Usage + +Simply pass the streams you want to pipe together to pump and add an optional callback + +``` js +var pump = require('pump') +var fs = require('fs') + +var source = fs.createReadStream('/dev/random') +var dest = fs.createWriteStream('/dev/null') + +pump(source, dest, function(err) { + console.log('pipe finished', err) +}) + +setTimeout(function() { + dest.destroy() // when dest is closed pump will destroy source +}, 1000) +``` + +You can use pump to pipe more than two streams together as well + +``` js +var transform = someTransformStream() + +pump(source, transform, anotherTransform, dest, function(err) { + console.log('pipe finished', err) +}) +``` + +If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed. + +Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do: + +``` +return pump(s1, s2) // returns s2 +``` + +If you want to return a stream that combines *both* s1 and s2 to a single stream use +[pumpify](https://github.com/mafintosh/pumpify) instead. + +## License + +MIT + +## Related + +`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/pump/index.js b/node_modules/pump/index.js new file mode 100644 index 00000000..c15059f1 --- /dev/null +++ b/node_modules/pump/index.js @@ -0,0 +1,82 @@ +var once = require('once') +var eos = require('end-of-stream') +var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes + +var noop = function () {} +var ancient = /^v?\.0/.test(process.version) + +var isFn = function (fn) { + return typeof fn === 'function' +} + +var isFS = function (stream) { + if (!ancient) return false // newer node version do not need to care about fs is a special way + if (!fs) return false // browser + return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) +} + +var isRequest = function (stream) { + return stream.setHeader && isFn(stream.abort) +} + +var destroyer = function (stream, reading, writing, callback) { + callback = once(callback) + + var closed = false + stream.on('close', function () { + closed = true + }) + + eos(stream, {readable: reading, writable: writing}, function (err) { + if (err) return callback(err) + closed = true + callback() + }) + + var destroyed = false + return function (err) { + if (closed) return + if (destroyed) return + destroyed = true + + if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks + if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want + + if (isFn(stream.destroy)) return stream.destroy() + + callback(err || new Error('stream was destroyed')) + } +} + +var call = function (fn) { + fn() +} + +var pipe = function (from, to) { + return from.pipe(to) +} + +var pump = function () { + var streams = Array.prototype.slice.call(arguments) + var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop + + if (Array.isArray(streams[0])) streams = streams[0] + if (streams.length < 2) throw new Error('pump requires two streams per minimum') + + var error + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1 + var writing = i > 0 + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err + if (err) destroys.forEach(call) + if (reading) return + destroys.forEach(call) + callback(error) + }) + }) + + return streams.reduce(pipe) +} + +module.exports = pump diff --git a/node_modules/pump/package.json b/node_modules/pump/package.json new file mode 100644 index 00000000..b3cc1db6 --- /dev/null +++ b/node_modules/pump/package.json @@ -0,0 +1,62 @@ +{ + "_args": [ + [ + "pump@3.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "pump@3.0.0", + "_id": "pump@3.0.0", + "_inBundle": false, + "_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "_location": "/pump", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pump@3.0.0", + "name": "pump", + "escapedName": "pump", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/get-stream" + ], + "_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Mathias Buus Madsen", + "email": "mathiasbuus@gmail.com" + }, + "browser": { + "fs": false + }, + "bugs": { + "url": "https://github.com/mafintosh/pump/issues" + }, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + }, + "description": "pipe streams together and close all of them if one of them closes", + "homepage": "https://github.com/mafintosh/pump#readme", + "keywords": [ + "streams", + "pipe", + "destroy", + "callback" + ], + "license": "MIT", + "name": "pump", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/pump.git" + }, + "scripts": { + "test": "node test-browser.js && node test-node.js" + }, + "version": "3.0.0" +} diff --git a/node_modules/pump/test-browser.js b/node_modules/pump/test-browser.js new file mode 100644 index 00000000..9a06c8a4 --- /dev/null +++ b/node_modules/pump/test-browser.js @@ -0,0 +1,66 @@ +var stream = require('stream') +var pump = require('./index') + +var rs = new stream.Readable() +var ws = new stream.Writable() + +rs._read = function (size) { + this.push(Buffer(size).fill('abc')) +} + +ws._write = function (chunk, encoding, cb) { + setTimeout(function () { + cb() + }, 100) +} + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) { + console.log('test-browser.js passes') + clearTimeout(timeout) + } +} + +ws.on('finish', function () { + wsClosed = true + check() +}) + +rs.on('end', function () { + rsClosed = true + check() +}) + +var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +if (res !== ws) { + throw new Error('should return last stream') +} + +setTimeout(function () { + rs.push(null) + rs.emit('close') +}, 1000) + +var timeout = setTimeout(function () { + check() + throw new Error('timeout') +}, 5000) diff --git a/node_modules/pump/test-node.js b/node_modules/pump/test-node.js new file mode 100644 index 00000000..561251a0 --- /dev/null +++ b/node_modules/pump/test-node.js @@ -0,0 +1,53 @@ +var pump = require('./index') + +var rs = require('fs').createReadStream('/dev/random') +var ws = require('fs').createWriteStream('/dev/null') + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) { + console.log('test-node.js passes') + clearTimeout(timeout) + } +} + +ws.on('close', function () { + wsClosed = true + check() +}) + +rs.on('close', function () { + rsClosed = true + check() +}) + +var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +if (res !== ws) { + throw new Error('should return last stream') +} + +setTimeout(function () { + rs.destroy() +}, 1000) + +var timeout = setTimeout(function () { + throw new Error('timeout') +}, 5000) diff --git a/node_modules/shebang-command/index.js b/node_modules/shebang-command/index.js new file mode 100644 index 00000000..2de70b07 --- /dev/null +++ b/node_modules/shebang-command/index.js @@ -0,0 +1,19 @@ +'use strict'; +var shebangRegex = require('shebang-regex'); + +module.exports = function (str) { + var match = str.match(shebangRegex); + + if (!match) { + return null; + } + + var arr = match[0].replace(/#! ?/, '').split(' '); + var bin = arr[0].split('/').pop(); + var arg = arr[1]; + + return (bin === 'env' ? + arg : + bin + (arg ? ' ' + arg : '') + ); +}; diff --git a/node_modules/shebang-command/license b/node_modules/shebang-command/license new file mode 100644 index 00000000..0f8cf79c --- /dev/null +++ b/node_modules/shebang-command/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Martensson (github.com/kevva) + +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/shebang-command/package.json b/node_modules/shebang-command/package.json new file mode 100644 index 00000000..0328b900 --- /dev/null +++ b/node_modules/shebang-command/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "shebang-command@1.2.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "shebang-command@1.2.0", + "_id": "shebang-command@1.2.0", + "_inBundle": false, + "_integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "_location": "/shebang-command", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "shebang-command@1.2.0", + "name": "shebang-command", + "escapedName": "shebang-command", + "rawSpec": "1.2.0", + "saveSpec": null, + "fetchSpec": "1.2.0" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "_spec": "1.2.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/shebang-command/issues" + }, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "description": "Get the command from a shebang", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/shebang-command#readme", + "keywords": [ + "cmd", + "command", + "parse", + "shebang" + ], + "license": "MIT", + "name": "shebang-command", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/shebang-command.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0", + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/shebang-command/readme.md b/node_modules/shebang-command/readme.md new file mode 100644 index 00000000..16b0be4d --- /dev/null +++ b/node_modules/shebang-command/readme.md @@ -0,0 +1,39 @@ +# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command) + +> Get the command from a shebang + + +## Install + +``` +$ npm install --save shebang-command +``` + + +## Usage + +```js +const shebangCommand = require('shebang-command'); + +shebangCommand('#!/usr/bin/env node'); +//=> 'node' + +shebangCommand('#!/bin/bash'); +//=> 'bash' +``` + + +## API + +### shebangCommand(string) + +#### string + +Type: `string` + +String containing a shebang. + + +## License + +MIT © [Kevin Martensson](http://github.com/kevva) diff --git a/node_modules/shebang-regex/index.js b/node_modules/shebang-regex/index.js new file mode 100644 index 00000000..d052d2e0 --- /dev/null +++ b/node_modules/shebang-regex/index.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = /^#!.*/; diff --git a/node_modules/shebang-regex/license b/node_modules/shebang-regex/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/shebang-regex/license @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/shebang-regex/package.json b/node_modules/shebang-regex/package.json new file mode 100644 index 00000000..b40f9c0a --- /dev/null +++ b/node_modules/shebang-regex/package.json @@ -0,0 +1,67 @@ +{ + "_args": [ + [ + "shebang-regex@1.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "shebang-regex@1.0.0", + "_id": "shebang-regex@1.0.0", + "_inBundle": false, + "_integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "_location": "/shebang-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "shebang-regex@1.0.0", + "name": "shebang-regex", + "escapedName": "shebang-regex", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/shebang-command" + ], + "_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/shebang-regex/issues" + }, + "description": "Regular expression for matching a shebang", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/shebang-regex#readme", + "keywords": [ + "re", + "regex", + "regexp", + "shebang", + "match", + "test" + ], + "license": "MIT", + "name": "shebang-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/shebang-regex.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/shebang-regex/readme.md b/node_modules/shebang-regex/readme.md new file mode 100644 index 00000000..ef75e51b --- /dev/null +++ b/node_modules/shebang-regex/readme.md @@ -0,0 +1,29 @@ +# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) + +> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) + + +## Install + +``` +$ npm install --save shebang-regex +``` + + +## Usage + +```js +var shebangRegex = require('shebang-regex'); +var str = '#!/usr/bin/env node\nconsole.log("unicorns");'; + +shebangRegex.test(str); +//=> true + +shebangRegex.exec(str)[0]; +//=> '#!/usr/bin/env node' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/signal-exit/CHANGELOG.md b/node_modules/signal-exit/CHANGELOG.md new file mode 100644 index 00000000..e2f70d22 --- /dev/null +++ b/node_modules/signal-exit/CHANGELOG.md @@ -0,0 +1,27 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08) + + +### Bug Fixes + +* do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb)) + + + + +# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) + + +### Bug Fixes + +* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8)) +* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c)) + + +### BREAKING CHANGES + +* signal-exit no longer wires into SIGPROF diff --git a/node_modules/signal-exit/LICENSE.txt b/node_modules/signal-exit/LICENSE.txt new file mode 100644 index 00000000..eead04a1 --- /dev/null +++ b/node_modules/signal-exit/LICENSE.txt @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) 2015, 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/signal-exit/README.md b/node_modules/signal-exit/README.md new file mode 100644 index 00000000..8ebccabe --- /dev/null +++ b/node_modules/signal-exit/README.md @@ -0,0 +1,40 @@ +# signal-exit + +[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) +[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) +[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) +[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +When you want to fire an event no matter how a process exits: + +* reaching the end of execution. +* explicitly having `process.exit(code)` called. +* having `process.kill(pid, sig)` called. +* receiving a fatal signal from outside the process + +Use `signal-exit`. + +```js +var onExit = require('signal-exit') + +onExit(function (code, signal) { + console.log('process exited!') +}) +``` + +## API + +`var remove = onExit(function (code, signal) {}, options)` + +The return value of the function is a function that will remove the +handler. + +Note that the function *only* fires for signals if the signal would +cause the proces to exit. That is, there are no other listeners, and +it is a fatal signal. + +## Options + +* `alwaysLast`: Run this handler after any other signal or exit + handlers. This causes `process.emit` to be monkeypatched. diff --git a/node_modules/signal-exit/index.js b/node_modules/signal-exit/index.js new file mode 100644 index 00000000..337f691e --- /dev/null +++ b/node_modules/signal-exit/index.js @@ -0,0 +1,157 @@ +// Note: since nyc uses this module to output coverage, any lines +// that are in the direct sync flow of nyc's outputCoverage are +// ignored, since we can never get coverage for them. +var assert = require('assert') +var signals = require('./signals.js') + +var EE = require('events') +/* istanbul ignore if */ +if (typeof EE !== 'function') { + EE = EE.EventEmitter +} + +var emitter +if (process.__signal_exit_emitter__) { + emitter = process.__signal_exit_emitter__ +} else { + emitter = process.__signal_exit_emitter__ = new EE() + emitter.count = 0 + emitter.emitted = {} +} + +// Because this emitter is a global, we have to check to see if a +// previous version of this library failed to enable infinite listeners. +// I know what you're about to say. But literally everything about +// signal-exit is a compromise with evil. Get used to it. +if (!emitter.infinite) { + emitter.setMaxListeners(Infinity) + emitter.infinite = true +} + +module.exports = function (cb, opts) { + assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') + + if (loaded === false) { + load() + } + + var ev = 'exit' + if (opts && opts.alwaysLast) { + ev = 'afterexit' + } + + var remove = function () { + emitter.removeListener(ev, cb) + if (emitter.listeners('exit').length === 0 && + emitter.listeners('afterexit').length === 0) { + unload() + } + } + emitter.on(ev, cb) + + return remove +} + +module.exports.unload = unload +function unload () { + if (!loaded) { + return + } + loaded = false + + signals.forEach(function (sig) { + try { + process.removeListener(sig, sigListeners[sig]) + } catch (er) {} + }) + process.emit = originalProcessEmit + process.reallyExit = originalProcessReallyExit + emitter.count -= 1 +} + +function emit (event, code, signal) { + if (emitter.emitted[event]) { + return + } + emitter.emitted[event] = true + emitter.emit(event, code, signal) +} + +// { : , ... } +var sigListeners = {} +signals.forEach(function (sig) { + sigListeners[sig] = function listener () { + // If there are no other listeners, an exit is coming! + // Simplest way: remove us and then re-send the signal. + // We know that this will kill the process, so we can + // safely emit now. + var listeners = process.listeners(sig) + if (listeners.length === emitter.count) { + unload() + emit('exit', null, sig) + /* istanbul ignore next */ + emit('afterexit', null, sig) + /* istanbul ignore next */ + process.kill(process.pid, sig) + } + } +}) + +module.exports.signals = function () { + return signals +} + +module.exports.load = load + +var loaded = false + +function load () { + if (loaded) { + return + } + loaded = true + + // This is the number of onSignalExit's that are in play. + // It's important so that we can count the correct number of + // listeners on signals, and don't wait for the other one to + // handle it instead of us. + emitter.count += 1 + + signals = signals.filter(function (sig) { + try { + process.on(sig, sigListeners[sig]) + return true + } catch (er) { + return false + } + }) + + process.emit = processEmit + process.reallyExit = processReallyExit +} + +var originalProcessReallyExit = process.reallyExit +function processReallyExit (code) { + process.exitCode = code || 0 + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + /* istanbul ignore next */ + originalProcessReallyExit.call(process, process.exitCode) +} + +var originalProcessEmit = process.emit +function processEmit (ev, arg) { + if (ev === 'exit') { + if (arg !== undefined) { + process.exitCode = arg + } + var ret = originalProcessEmit.apply(this, arguments) + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + return ret + } else { + return originalProcessEmit.apply(this, arguments) + } +} diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json new file mode 100644 index 00000000..4d958ede --- /dev/null +++ b/node_modules/signal-exit/package.json @@ -0,0 +1,71 @@ +{ + "_args": [ + [ + "signal-exit@3.0.2", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "signal-exit@3.0.2", + "_id": "signal-exit@3.0.2", + "_inBundle": false, + "_integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "_location": "/signal-exit", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "signal-exit@3.0.2", + "name": "signal-exit", + "escapedName": "signal-exit", + "rawSpec": "3.0.2", + "saveSpec": null, + "fetchSpec": "3.0.2" + }, + "_requiredBy": [ + "/execa", + "/restore-cursor", + "/write-file-atomic" + ], + "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "_spec": "3.0.2", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Ben Coe", + "email": "ben@npmjs.com" + }, + "bugs": { + "url": "https://github.com/tapjs/signal-exit/issues" + }, + "description": "when you want to fire an event no matter how a process exits.", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.10", + "nyc": "^8.1.0", + "standard": "^7.1.2", + "standard-version": "^2.3.0", + "tap": "^8.0.1" + }, + "files": [ + "index.js", + "signals.js" + ], + "homepage": "https://github.com/tapjs/signal-exit", + "keywords": [ + "signal", + "exit" + ], + "license": "ISC", + "main": "index.js", + "name": "signal-exit", + "repository": { + "type": "git", + "url": "git+https://github.com/tapjs/signal-exit.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "tap --timeout=240 ./test/*.js --cov" + }, + "version": "3.0.2" +} diff --git a/node_modules/signal-exit/signals.js b/node_modules/signal-exit/signals.js new file mode 100644 index 00000000..3bd67a8a --- /dev/null +++ b/node_modules/signal-exit/signals.js @@ -0,0 +1,53 @@ +// This is not the set of all possible signals. +// +// It IS, however, the set of all signals that trigger +// an exit on either Linux or BSD systems. Linux is a +// superset of the signal names supported on BSD, and +// the unknown signals just fail to register, so we can +// catch that easily enough. +// +// Don't bother with SIGKILL. It's uncatchable, which +// means that we can't fire any callbacks anyway. +// +// If a user does happen to register a handler on a non- +// fatal signal like SIGWINCH or something, and then +// exit, it'll end up firing `process.emit('exit')`, so +// the handler will be fired anyway. +// +// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised +// artificially, inherently leave the process in a +// state from which it is not safe to try and enter JS +// listeners. +module.exports = [ + 'SIGABRT', + 'SIGALRM', + 'SIGHUP', + 'SIGINT', + 'SIGTERM' +] + +if (process.platform !== 'win32') { + module.exports.push( + 'SIGVTALRM', + 'SIGXCPU', + 'SIGXFSZ', + 'SIGUSR2', + 'SIGTRAP', + 'SIGSYS', + 'SIGQUIT', + 'SIGIOT' + // should detect profiler and enable/disable accordingly. + // see #21 + // 'SIGPROF' + ) +} + +if (process.platform === 'linux') { + module.exports.push( + 'SIGIO', + 'SIGPOLL', + 'SIGPWR', + 'SIGSTKFLT', + 'SIGUNUSED' + ) +} diff --git a/node_modules/strip-eof/index.js b/node_modules/strip-eof/index.js new file mode 100644 index 00000000..a17d0afd --- /dev/null +++ b/node_modules/strip-eof/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function (x) { + var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); + var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); + + if (x[x.length - 1] === lf) { + x = x.slice(0, x.length - 1); + } + + if (x[x.length - 1] === cr) { + x = x.slice(0, x.length - 1); + } + + return x; +}; diff --git a/node_modules/strip-eof/license b/node_modules/strip-eof/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/strip-eof/license @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/strip-eof/package.json b/node_modules/strip-eof/package.json new file mode 100644 index 00000000..94703dc6 --- /dev/null +++ b/node_modules/strip-eof/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "strip-eof@1.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "strip-eof@1.0.0", + "_id": "strip-eof@1.0.0", + "_inBundle": false, + "_integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "_location": "/strip-eof", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "strip-eof@1.0.0", + "name": "strip-eof", + "escapedName": "strip-eof", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-eof/issues" + }, + "description": "Strip the End-Of-File (EOF) character from a string/buffer", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/strip-eof#readme", + "keywords": [ + "strip", + "trim", + "remove", + "delete", + "eof", + "end", + "file", + "newline", + "linebreak", + "character", + "string", + "buffer" + ], + "license": "MIT", + "name": "strip-eof", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-eof.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/strip-eof/readme.md b/node_modules/strip-eof/readme.md new file mode 100644 index 00000000..45ffe043 --- /dev/null +++ b/node_modules/strip-eof/readme.md @@ -0,0 +1,28 @@ +# strip-eof [![Build Status](https://travis-ci.org/sindresorhus/strip-eof.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-eof) + +> Strip the [End-Of-File](https://en.wikipedia.org/wiki/End-of-file) (EOF) character from a string/buffer + + +## Install + +``` +$ npm install --save strip-eof +``` + + +## Usage + +```js +const stripEof = require('strip-eof'); + +stripEof('foo\nbar\n\n'); +//=> 'foo\nbar\n' + +stripEof(new Buffer('foo\nbar\n\n')).toString(); +//=> 'foo\nbar\n' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/tunnel/CHANGELOG.md b/node_modules/tunnel/CHANGELOG.md new file mode 100644 index 00000000..baf6b181 --- /dev/null +++ b/node_modules/tunnel/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + + - 0.0.6 (2018/09/11) + - Fix `localAddress` not working (#25) + - Fix `Host:` header for CONNECT method by @tmurakam (#29, #30) + - Fix default port for https (#32) + - Fix error handling when the proxy send illegal response body (#33) + + - 0.0.5 (2017/06/12) + - Fix socket leak. + + - 0.0.4 (2016/01/23) + - supported Node v0.12 or later. + + - 0.0.3 (2014/01/20) + - fixed package.json + + - 0.0.1 (2012/02/18) + - supported Node v0.6.x (0.6.11 or later). + + - 0.0.0 (2012/02/11) + - first release. diff --git a/node_modules/tunnel/LICENSE b/node_modules/tunnel/LICENSE new file mode 100644 index 00000000..8b8a895c --- /dev/null +++ b/node_modules/tunnel/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/node_modules/tunnel/README.md b/node_modules/tunnel/README.md new file mode 100644 index 00000000..f54bca52 --- /dev/null +++ b/node_modules/tunnel/README.md @@ -0,0 +1,185 @@ +# node-tunnel - HTTP/HTTPS Agents for tunneling proxies + +[![Build Status](https://img.shields.io/travis/koichik/node-tunnel.svg?style=flat)](https://travis-ci.org/koichik/node-tunnel) +[![Dependency Status](http://img.shields.io/david/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=dependencies) +[![DevDependency Status](http://img.shields.io/david/dev/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=devDependencies) + +## Example + +```javascript +var tunnel = require('tunnel'); + +var tunnelingAgent = tunnel.httpsOverHttp({ + proxy: { + host: 'localhost', + port: 3128 + } +}); + +var req = https.request({ + host: 'example.com', + port: 443, + agent: tunnelingAgent +}); +``` + +## Installation + + $ npm install tunnel + +## Usages + +### HTTP over HTTP tunneling + +```javascript +var tunnelingAgent = tunnel.httpOverHttp({ + maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets + + proxy: { // Proxy settings + host: proxyHost, // Defaults to 'localhost' + port: proxyPort, // Defaults to 80 + localAddress: localAddress, // Local interface if necessary + + // Basic authorization for proxy server if necessary + proxyAuth: 'user:password', + + // Header fields for proxy server if necessary + headers: { + 'User-Agent': 'Node' + } + } +}); + +var req = http.request({ + host: 'example.com', + port: 80, + agent: tunnelingAgent +}); +``` + +### HTTPS over HTTP tunneling + +```javascript +var tunnelingAgent = tunnel.httpsOverHttp({ + maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets + + // CA for origin server if necessary + ca: [ fs.readFileSync('origin-server-ca.pem')], + + // Client certification for origin server if necessary + key: fs.readFileSync('origin-server-key.pem'), + cert: fs.readFileSync('origin-server-cert.pem'), + + proxy: { // Proxy settings + host: proxyHost, // Defaults to 'localhost' + port: proxyPort, // Defaults to 80 + localAddress: localAddress, // Local interface if necessary + + // Basic authorization for proxy server if necessary + proxyAuth: 'user:password', + + // Header fields for proxy server if necessary + headers: { + 'User-Agent': 'Node' + }, + } +}); + +var req = https.request({ + host: 'example.com', + port: 443, + agent: tunnelingAgent +}); +``` + +### HTTP over HTTPS tunneling + +```javascript +var tunnelingAgent = tunnel.httpOverHttps({ + maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets + + proxy: { // Proxy settings + host: proxyHost, // Defaults to 'localhost' + port: proxyPort, // Defaults to 443 + localAddress: localAddress, // Local interface if necessary + + // Basic authorization for proxy server if necessary + proxyAuth: 'user:password', + + // Header fields for proxy server if necessary + headers: { + 'User-Agent': 'Node' + }, + + // CA for proxy server if necessary + ca: [ fs.readFileSync('origin-server-ca.pem')], + + // Server name for verification if necessary + servername: 'example.com', + + // Client certification for proxy server if necessary + key: fs.readFileSync('origin-server-key.pem'), + cert: fs.readFileSync('origin-server-cert.pem'), + } +}); + +var req = http.request({ + host: 'example.com', + port: 80, + agent: tunnelingAgent +}); +``` + +### HTTPS over HTTPS tunneling + +```javascript +var tunnelingAgent = tunnel.httpsOverHttps({ + maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets + + // CA for origin server if necessary + ca: [ fs.readFileSync('origin-server-ca.pem')], + + // Client certification for origin server if necessary + key: fs.readFileSync('origin-server-key.pem'), + cert: fs.readFileSync('origin-server-cert.pem'), + + proxy: { // Proxy settings + host: proxyHost, // Defaults to 'localhost' + port: proxyPort, // Defaults to 443 + localAddress: localAddress, // Local interface if necessary + + // Basic authorization for proxy server if necessary + proxyAuth: 'user:password', + + // Header fields for proxy server if necessary + headers: { + 'User-Agent': 'Node' + } + + // CA for proxy server if necessary + ca: [ fs.readFileSync('origin-server-ca.pem')], + + // Server name for verification if necessary + servername: 'example.com', + + // Client certification for proxy server if necessary + key: fs.readFileSync('origin-server-key.pem'), + cert: fs.readFileSync('origin-server-cert.pem'), + } +}); + +var req = https.request({ + host: 'example.com', + port: 443, + agent: tunnelingAgent +}); +``` + +## CONTRIBUTORS +* [Aleksis Brezas (abresas)](https://github.com/abresas) +* [Jackson Tian (JacksonTian)](https://github.com/JacksonTian) +* [Dmitry Sorin (1999)](https://github.com/1999) + +## License + +Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) license. diff --git a/node_modules/tunnel/index.js b/node_modules/tunnel/index.js new file mode 100644 index 00000000..29477574 --- /dev/null +++ b/node_modules/tunnel/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/tunnel'); diff --git a/node_modules/tunnel/lib/tunnel.js b/node_modules/tunnel/lib/tunnel.js new file mode 100644 index 00000000..10cc382d --- /dev/null +++ b/node_modules/tunnel/lib/tunnel.js @@ -0,0 +1,264 @@ +'use strict'; + +var net = require('net'); +var tls = require('tls'); +var http = require('http'); +var https = require('https'); +var events = require('events'); +var assert = require('assert'); +var util = require('util'); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + + +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + + function onFree() { + self.emit('free', socket, options); + } + + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } + + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + + function onError(cause) { + connectReq.removeAllListeners(); + + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; + +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; +} + + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); + } +} else { + debug = function() {}; +} +exports.debug = debug; // for test diff --git a/node_modules/tunnel/package.json b/node_modules/tunnel/package.json new file mode 100644 index 00000000..582d8411 --- /dev/null +++ b/node_modules/tunnel/package.json @@ -0,0 +1,67 @@ +{ + "_args": [ + [ + "tunnel@0.0.6", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "tunnel@0.0.6", + "_id": "tunnel@0.0.6", + "_inBundle": false, + "_integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "_location": "/tunnel", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "tunnel@0.0.6", + "name": "tunnel", + "escapedName": "tunnel", + "rawSpec": "0.0.6", + "saveSpec": null, + "fetchSpec": "0.0.6" + }, + "_requiredBy": [ + "/@actions/http-client" + ], + "_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "_spec": "0.0.6", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Koichi Kobayashi", + "email": "koichik@improvement.jp" + }, + "bugs": { + "url": "https://github.com/koichik/node-tunnel/issues" + }, + "description": "Node HTTP/HTTPS Agents for tunneling proxies", + "devDependencies": { + "mocha": "^5.2.0", + "should": "^13.2.3" + }, + "directories": { + "lib": "./lib" + }, + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + }, + "homepage": "https://github.com/koichik/node-tunnel/", + "keywords": [ + "http", + "https", + "agent", + "proxy", + "tunnel" + ], + "license": "MIT", + "main": "./index.js", + "name": "tunnel", + "repository": { + "type": "git", + "url": "git+https://github.com/koichik/node-tunnel.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.0.6" +} diff --git a/node_modules/universal-user-agent/LICENSE.md b/node_modules/universal-user-agent/LICENSE.md new file mode 100644 index 00000000..f105ab0c --- /dev/null +++ b/node_modules/universal-user-agent/LICENSE.md @@ -0,0 +1,7 @@ +# [ISC License](https://spdx.org/licenses/ISC) + +Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/universal-user-agent/README.md b/node_modules/universal-user-agent/README.md new file mode 100644 index 00000000..d00d14c1 --- /dev/null +++ b/node_modules/universal-user-agent/README.md @@ -0,0 +1,25 @@ +# universal-user-agent + +> Get a user agent string in both browser and node + +[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) +[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) +[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) + +```js +const { getUserAgent } = require("universal-user-agent"); +// or import { getUserAgent } from "universal-user-agent"; + +const userAgent = getUserAgent(); +// userAgent will look like this +// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" +// in node: Node.js/v8.9.4 (macOS High Sierra; x64) +``` + +## Credits + +The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). + +## License + +[ISC](LICENSE.md) diff --git a/node_modules/universal-user-agent/dist-node/index.js b/node_modules/universal-user-agent/dist-node/index.js new file mode 100644 index 00000000..80a07105 --- /dev/null +++ b/node_modules/universal-user-agent/dist-node/index.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var osName = _interopDefault(require('os-name')); + +function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } + + throw error; + } +} + +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map diff --git a/node_modules/universal-user-agent/dist-node/index.js.map b/node_modules/universal-user-agent/dist-node/index.js.map new file mode 100644 index 00000000..aff09ec4 --- /dev/null +++ b/node_modules/universal-user-agent/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows \";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"} \ No newline at end of file diff --git a/node_modules/universal-user-agent/dist-src/browser.js b/node_modules/universal-user-agent/dist-src/browser.js new file mode 100644 index 00000000..6f52232c --- /dev/null +++ b/node_modules/universal-user-agent/dist-src/browser.js @@ -0,0 +1,3 @@ +export function getUserAgent() { + return navigator.userAgent; +} diff --git a/node_modules/universal-user-agent/dist-src/index.js b/node_modules/universal-user-agent/dist-src/index.js new file mode 100644 index 00000000..c6253f5a --- /dev/null +++ b/node_modules/universal-user-agent/dist-src/index.js @@ -0,0 +1 @@ +export { getUserAgent } from "./node"; diff --git a/node_modules/universal-user-agent/dist-src/node.js b/node_modules/universal-user-agent/dist-src/node.js new file mode 100644 index 00000000..8b70a038 --- /dev/null +++ b/node_modules/universal-user-agent/dist-src/node.js @@ -0,0 +1,12 @@ +import osName from "os-name"; +export function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } + catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } + throw error; + } +} diff --git a/node_modules/universal-user-agent/dist-types/browser.d.ts b/node_modules/universal-user-agent/dist-types/browser.d.ts new file mode 100644 index 00000000..a7bb1c44 --- /dev/null +++ b/node_modules/universal-user-agent/dist-types/browser.d.ts @@ -0,0 +1 @@ +export declare function getUserAgent(): string; diff --git a/node_modules/universal-user-agent/dist-types/index.d.ts b/node_modules/universal-user-agent/dist-types/index.d.ts new file mode 100644 index 00000000..c6253f5a --- /dev/null +++ b/node_modules/universal-user-agent/dist-types/index.d.ts @@ -0,0 +1 @@ +export { getUserAgent } from "./node"; diff --git a/node_modules/universal-user-agent/dist-types/node.d.ts b/node_modules/universal-user-agent/dist-types/node.d.ts new file mode 100644 index 00000000..a7bb1c44 --- /dev/null +++ b/node_modules/universal-user-agent/dist-types/node.d.ts @@ -0,0 +1 @@ +export declare function getUserAgent(): string; diff --git a/node_modules/universal-user-agent/dist-web/index.js b/node_modules/universal-user-agent/dist-web/index.js new file mode 100644 index 00000000..11ec79b3 --- /dev/null +++ b/node_modules/universal-user-agent/dist-web/index.js @@ -0,0 +1,6 @@ +function getUserAgent() { + return navigator.userAgent; +} + +export { getUserAgent }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/universal-user-agent/dist-web/index.js.map b/node_modules/universal-user-agent/dist-web/index.js.map new file mode 100644 index 00000000..549407ec --- /dev/null +++ b/node_modules/universal-user-agent/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"} \ No newline at end of file diff --git a/node_modules/universal-user-agent/package.json b/node_modules/universal-user-agent/package.json new file mode 100644 index 00000000..064cb11d --- /dev/null +++ b/node_modules/universal-user-agent/package.json @@ -0,0 +1,71 @@ +{ + "_args": [ + [ + "universal-user-agent@4.0.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "universal-user-agent@4.0.0", + "_id": "universal-user-agent@4.0.0", + "_inBundle": false, + "_integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", + "_location": "/universal-user-agent", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "universal-user-agent@4.0.0", + "name": "universal-user-agent", + "escapedName": "universal-user-agent", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint", + "/@octokit/graphql", + "/@octokit/request", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "bugs": { + "url": "https://github.com/gr2m/universal-user-agent/issues" + }, + "dependencies": { + "os-name": "^3.1.0" + }, + "description": "Get a user agent string in both browser and node", + "devDependencies": { + "@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.6.0", + "@pika/plugin-ts-standard-pkg": "^0.6.0", + "@types/jest": "^24.0.18", + "jest": "^24.9.0", + "prettier": "^1.18.2", + "semantic-release": "^15.9.15", + "ts-jest": "^24.0.2", + "typescript": "^3.6.2" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/gr2m/universal-user-agent#readme", + "keywords": [], + "license": "ISC", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "universal-user-agent", + "pika": true, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/universal-user-agent.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "4.0.0" +} diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md new file mode 100644 index 00000000..3d83d269 --- /dev/null +++ b/node_modules/which/CHANGELOG.md @@ -0,0 +1,152 @@ +# Changes + + +## 1.3.1 + +* update deps +* update travis + +## v1.3.0 + +* Add nothrow option to which.sync +* update tap + +## v1.2.14 + +* appveyor: drop node 5 and 0.x +* travis-ci: add node 6, drop 0.x + +## v1.2.13 + +* test: Pass missing option to pass on windows +* update tap +* update isexe to 2.0.0 +* neveragain.tech pledge request + +## v1.2.12 + +* Removed unused require + +## v1.2.11 + +* Prevent changelog script from being included in package + +## v1.2.10 + +* Use env.PATH only, not env.Path + +## v1.2.9 + +* fix for paths starting with ../ +* Remove unused `is-absolute` module + +## v1.2.8 + +* bullet items in changelog that contain (but don't start with) # + +## v1.2.7 + +* strip 'update changelog' changelog entries out of changelog + +## v1.2.6 + +* make the changelog bulleted + +## v1.2.5 + +* make a changelog, and keep it up to date +* don't include tests in package +* Properly handle relative-path executables +* appveyor +* Attach error code to Not Found error +* Make tests pass on Windows + +## v1.2.4 + +* Fix typo + +## v1.2.3 + +* update isexe, fix regression in pathExt handling + +## v1.2.2 + +* update deps, use isexe module, test windows + +## v1.2.1 + +* Sometimes windows PATH entries are quoted +* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. +* doc cli + +## v1.2.0 + +* Add support for opt.all and -as cli flags +* test the bin +* update travis +* Allow checking for multiple programs in bin/which +* tap 2 + +## v1.1.2 + +* travis +* Refactored and fixed undefined error on Windows +* Support strict mode + +## v1.1.1 + +* test +g exes against secondary groups, if available +* Use windows exe semantics on cygwin & msys +* cwd should be first in path on win32, not last +* Handle lower-case 'env.Path' on Windows +* Update docs +* use single-quotes + +## v1.1.0 + +* Add tests, depend on is-absolute + +## v1.0.9 + +* which.js: root is allowed to execute files owned by anyone + +## v1.0.8 + +* don't use graceful-fs + +## v1.0.7 + +* add license to package.json + +## v1.0.6 + +* isc license + +## 1.0.5 + +* Awful typo + +## 1.0.4 + +* Test for path absoluteness properly +* win: Allow '' as a pathext if cmd has a . in it + +## 1.0.3 + +* Remove references to execPath +* Make `which.sync()` work on Windows by honoring the PATHEXT variable. +* Make `isExe()` always return true on Windows. +* MIT + +## 1.0.2 + +* Only files can be exes + +## 1.0.1 + +* Respect the PATHEXT env for win32 support +* should 0755 the bin +* binary +* guts +* package +* 1st diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/which/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/which/README.md b/node_modules/which/README.md new file mode 100644 index 00000000..8c0b0cbf --- /dev/null +++ b/node_modules/which/README.md @@ -0,0 +1,51 @@ +# which + +Like the unix `which` utility. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// if nothrow option is used, returns null if not found +resolved = which.sync('node', {nothrow: true}) + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/node_modules/which/bin/which b/node_modules/which/bin/which new file mode 100755 index 00000000..7cee3729 --- /dev/null +++ b/node_modules/which/bin/which @@ -0,0 +1,52 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') + process.exit(1) +} + +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } + } + return false +}) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json new file mode 100644 index 00000000..b9aa34e4 --- /dev/null +++ b/node_modules/which/package.json @@ -0,0 +1,69 @@ +{ + "_args": [ + [ + "which@1.3.1", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "which@1.3.1", + "_id": "which@1.3.1", + "_inBundle": false, + "_integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "_location": "/which", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "which@1.3.1", + "name": "which", + "escapedName": "which", + "rawSpec": "1.3.1", + "saveSpec": null, + "fetchSpec": "1.3.1" + }, + "_requiredBy": [ + "/cross-spawn", + "/node-notifier" + ], + "_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "_spec": "1.3.1", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bin": { + "which": "bin/which" + }, + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "dependencies": { + "isexe": "^2.0.0" + }, + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.6.2", + "tap": "^12.0.1" + }, + "files": [ + "which.js", + "bin/which" + ], + "homepage": "https://github.com/isaacs/node-which#readme", + "license": "ISC", + "main": "which.js", + "name": "which", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "scripts": { + "changelog": "bash gen-changelog.sh", + "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", + "test": "tap test/*.js --cov" + }, + "version": "1.3.1" +} diff --git a/node_modules/which/which.js b/node_modules/which/which.js new file mode 100644 index 00000000..4347f91a --- /dev/null +++ b/node_modules/which/which.js @@ -0,0 +1,135 @@ +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isexe = require('isexe') + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er +} + +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + if (opt.nothrow) + return null + + throw getNotFoundError(cmd) +} diff --git a/node_modules/windows-release/index.d.ts b/node_modules/windows-release/index.d.ts new file mode 100644 index 00000000..6a9c44f6 --- /dev/null +++ b/node_modules/windows-release/index.d.ts @@ -0,0 +1,30 @@ +/** +Get the name of a Windows version from the release number: `5.1.2600` → `XP`. + +@param release - By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). + +Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`. + +@example +``` +import * as os from 'os'; +import windowsRelease = require('windows-release'); + +// On a Windows XP system + +windowsRelease(); +//=> 'XP' + +os.release(); +//=> '5.1.2600' + +windowsRelease(os.release()); +//=> 'XP' + +windowsRelease('4.9.3000'); +//=> 'ME' +``` +*/ +declare function windowsRelease(release?: string): string; + +export = windowsRelease; diff --git a/node_modules/windows-release/index.js b/node_modules/windows-release/index.js new file mode 100644 index 00000000..cb9ea9f0 --- /dev/null +++ b/node_modules/windows-release/index.js @@ -0,0 +1,44 @@ +'use strict'; +const os = require('os'); +const execa = require('execa'); + +// Reference: https://www.gaijin.at/en/lstwinver.php +const names = new Map([ + ['10.0', '10'], + ['6.3', '8.1'], + ['6.2', '8'], + ['6.1', '7'], + ['6.0', 'Vista'], + ['5.2', 'Server 2003'], + ['5.1', 'XP'], + ['5.0', '2000'], + ['4.9', 'ME'], + ['4.1', '98'], + ['4.0', '95'] +]); + +const windowsRelease = release => { + const version = /\d+\.\d/.exec(release || os.release()); + + if (release && !version) { + throw new Error('`release` argument doesn\'t match `n.n`'); + } + + const ver = (version || [])[0]; + + // Server 2008, 2012 and 2016 versions are ambiguous with desktop versions and must be detected at runtime. + // If `release` is omitted or we're on a Windows system, and the version number is an ambiguous version + // then use `wmic` to get the OS caption: https://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx + // If the resulting caption contains the year 2008, 2012 or 2016, it is a server version, so return a server OS name. + if ((!release || release === os.release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) { + const stdout = execa.sync('wmic', ['os', 'get', 'Caption']).stdout || ''; + const year = (stdout.match(/2008|2012|2016/) || [])[0]; + if (year) { + return `Server ${year}`; + } + } + + return names.get(ver); +}; + +module.exports = windowsRelease; diff --git a/node_modules/windows-release/license b/node_modules/windows-release/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/windows-release/license @@ -0,0 +1,9 @@ +MIT License + +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. diff --git a/node_modules/windows-release/package.json b/node_modules/windows-release/package.json new file mode 100644 index 00000000..08e08bea --- /dev/null +++ b/node_modules/windows-release/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "windows-release@3.2.0", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "windows-release@3.2.0", + "_id": "windows-release@3.2.0", + "_inBundle": false, + "_integrity": "sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA==", + "_location": "/windows-release", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "windows-release@3.2.0", + "name": "windows-release", + "escapedName": "windows-release", + "rawSpec": "3.2.0", + "saveSpec": null, + "fetchSpec": "3.2.0" + }, + "_requiredBy": [ + "/os-name" + ], + "_resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.2.0.tgz", + "_spec": "3.2.0", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/windows-release/issues" + }, + "dependencies": { + "execa": "^1.0.0" + }, + "description": "Get the name of a Windows version from the release number: `5.1.2600` → `XP`", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/windows-release#readme", + "keywords": [ + "os", + "win", + "win32", + "windows", + "operating", + "system", + "platform", + "name", + "title", + "release", + "version" + ], + "license": "MIT", + "name": "windows-release", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/windows-release.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.2.0" +} diff --git a/node_modules/windows-release/readme.md b/node_modules/windows-release/readme.md new file mode 100644 index 00000000..66557eab --- /dev/null +++ b/node_modules/windows-release/readme.md @@ -0,0 +1,56 @@ +# windows-release [![Build Status](https://travis-ci.org/sindresorhus/windows-release.svg?branch=master)](https://travis-ci.org/sindresorhus/windows-release) + +> Get the name of a Windows version from the release number: `5.1.2600` → `XP` + + +## Install + +``` +$ npm install windows-release +``` + + +## Usage + +```js +const os = require('os'); +const windowsRelease = require('windows-release'); + +// On a Windows XP system + +windowsRelease(); +//=> 'XP' + +os.release(); +//=> '5.1.2600' + +windowsRelease(os.release()); +//=> 'XP' + +windowsRelease('4.9.3000'); +//=> 'ME' +``` + + +## API + +### windowsRelease([release]) + +#### release + +Type: `string` + +By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). + +Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`. + + +## Related + +- [os-name](https://github.com/sindresorhus/os-name) - Get the name of the current operating system +- [macos-release](https://github.com/sindresorhus/macos-release) - Get the name and version of a macOS release from the Darwin version + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/wrappy/LICENSE b/node_modules/wrappy/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/wrappy/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/wrappy/README.md b/node_modules/wrappy/README.md new file mode 100644 index 00000000..98eab252 --- /dev/null +++ b/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json new file mode 100644 index 00000000..630d95af --- /dev/null +++ b/node_modules/wrappy/package.json @@ -0,0 +1,62 @@ +{ + "_args": [ + [ + "wrappy@1.0.2", + "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working" + ] + ], + "_from": "wrappy@1.0.2", + "_id": "wrappy@1.0.2", + "_inBundle": false, + "_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "_location": "/wrappy", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "wrappy@1.0.2", + "name": "wrappy", + "escapedName": "wrappy", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/inflight", + "/once" + ], + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/Users/shogoichinose/src/github.com/shogo82148/actions-upload-release-asset/.working", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "dependencies": {}, + "description": "Callback wrapping utility", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "files": [ + "wrappy.js" + ], + "homepage": "https://github.com/npm/wrappy", + "license": "ISC", + "main": "wrappy.js", + "name": "wrappy", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "version": "1.0.2" +} diff --git a/node_modules/wrappy/wrappy.js b/node_modules/wrappy/wrappy.js new file mode 100644 index 00000000..bb7e7d6f --- /dev/null +++ b/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/package-lock.json b/package-lock.json index 05510e3d..b80e528b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "typescript-action", - "version": "0.0.0", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 57e2adef..6bb4e82e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typescript-action", - "version": "0.0.0", + "version": "1.0.0", "private": true, "description": "TypeScript template action", "main": "lib/main.js",